roc/src
2025-06-27 14:48:36 +10:00
..
base Don't store region in type problem 2025-06-25 17:23:44 -04:00
build simplify Can reports, remove unused Alias.zig, improve not_implemented error 2025-06-16 15:18:16 +10:00
builtins Enforce number literal bounds in type checking 2025-06-26 18:04:25 -04:00
check migrate decl, var, ty_decl, and imports 2025-06-27 14:48:36 +10:00
collections add helpers for SafeMultiList also 2025-06-24 13:31:00 +10:00
coordinate Remove source from ModuleEnv (#7839) 2025-06-18 13:46:33 +02:00
eval Use std.mem.Alignment in alloca 2025-06-03 23:08:42 -04:00
layout Enforce number literal bounds in type checking 2025-06-26 18:04:25 -04:00
reporting improve Region consistency and calculations 2025-06-23 13:56:13 +10:00
snapshots Merge remote-tracking branch 'origin/main' into records-can 2025-06-26 21:37:23 -04:00
types Merge remote-tracking branch 'origin/main' into enforce-literal-sizes 2025-06-26 18:14:15 -04:00
base.zig Merge remote-tracking branch 'origin/main' into can-ints 2025-06-25 13:13:46 -04:00
cache.zig initial round-trip using cache, just NodeStore for now 2025-06-24 14:37:11 +10:00
cli_args.zig Fix method casing 2025-06-09 22:21:26 -05:00
collections.zig Bunch of fixes 2025-06-19 15:13:25 -04:00
coordinate.zig Remove source from ModuleEnv (#7839) 2025-06-18 13:46:33 +02:00
coordinate_simple.zig Don't store region in type problem 2025-06-25 17:23:44 -04:00
example-flamegraph.png add guide to profiling roc 2025-03-17 18:43:29 -07:00
example-samply.png add guide to profiling roc 2025-03-17 18:43:29 -07:00
example-tracy.png add guide to profiling roc 2025-03-17 18:43:29 -07:00
fmt.zig Merge remote-tracking branch 'origin/main' into enforce-literal-sizes 2025-06-26 18:08:56 -04:00
fuzz-parse.zig revamp formatter to never allocate 2025-03-15 14:14:34 -07:00
fuzz-repro.zig Add more doc comments 2025-03-06 19:58:54 -08:00
fuzz-tokenize.zig Improve snapshot tool cli 2025-03-07 17:35:12 -08:00
host_abi.zig WIP compiles again 2025-06-07 13:49:54 +10:00
main.zig fix config usage in reporting 2025-06-23 11:06:35 +10:00
NOTES.md Add more doc comments 2025-03-06 19:58:54 -08:00
README.fuzzing.md typos 2025-02-22 13:02:28 +11:00
README.md compiler overview img (#7800) 2025-05-19 19:01:31 +02:00
README.profiling.md glossary: type signature + typos upgrade (#7776) 2025-05-07 17:35:56 +02:00
reporting.zig Use markdown formatting instead of PlainText for Problem Reports 2025-06-23 11:06:34 +10:00
snapshot.zig Fix statement snapshots, implement more Can for type annotations 2025-06-26 14:55:55 +10:00
test.zig initial round-trip using cache, just NodeStore for now 2025-06-24 14:37:11 +10:00
tracy-shutdown.cpp [tracy] wait for shutdown 2025-03-18 22:55:17 -07:00
tracy.zig add doc comment 2025-03-18 23:09:27 -07:00
types.zig Basic error message 2025-06-22 17:51:42 -04:00
zig_llvm.cpp actually add llvm (though still not using it) 2025-02-13 17:15:06 -08:00
zig_llvm.h actually add llvm (though still not using it) 2025-02-13 17:15:06 -08:00

Status

This table provides a summary of progress for the zig compiler re-write and should be updated with the PR that includes new features.

Str & Num * Functions Modules Collections Records & Tuples Recursive Types Static Dispatch
Parse 🪫 🪫 🚧 🪫 🪫 🪫 🪫
Canonicalize 🚧 🚧
Resolve Imports
Check Types
Interpreter
Specialize Types
Lift Functions
Solve Functions
Specialize Functions
Reference Counting
Lower IR
Gen LLVM
  • N/A Not applicable
  • 🚧 Work Started
  • 🪫 Tests Passing
  • 🔋 Polished

Fast Feedback Loop

The roc zig compiler can have a very fast feedback loop. We support zigs incremental compilation and watch mode. By avoiding generating final executables, we can build and typecheck much much faster.

Try it with zig build -Dno-bin -fincremental --watch

Expanding to ZLS

This fast config can also be used with zls. Simply follow these steps:

  1. run zls --version and make sure it is 0.14.0.
  2. run zls env and grab the config_file path.
  3. Edit the config file to include
{
  "enable_build_on_save": true,
  "build_on_save_args": ["-Dno-bin", "-fincremental"]
}
  1. Advised, also changing the cache dir, I use --cache-dir .zig-cache/zls. Otherwise, zig commands run manually can lead to the lsp breaking and requiring a restart.
  2. Optionally, add -Dfuzz above as well to get type checking of fuzz scripts as well.
  3. Note, I had to fully delete my .zig-cache to get zls to start. Make sure to check the logs if you aren't getting type failures.
  4. Enjoy better lsp results.

Simply testing feedback loop

Sadly, this is not nearly as fast due to building binaries. One day, we will get dev zig backends, and it should be fast.

Try it with zig build test -fincremental --watch

Overview

Zig Dependency Graph