mirror of
https://github.com/roc-lang/roc.git
synced 2025-07-08 07:05:03 +00:00
.. | ||
base | ||
build | ||
builtins | ||
check | ||
collections | ||
coordinate | ||
eval | ||
layout | ||
reporting | ||
snapshots | ||
types | ||
base.zig | ||
cache.zig | ||
cli_args.zig | ||
collections.zig | ||
coordinate.zig | ||
coordinate_simple.zig | ||
example-flamegraph.png | ||
example-samply.png | ||
example-tracy.png | ||
fmt.zig | ||
fuzz-parse.zig | ||
fuzz-repro.zig | ||
fuzz-tokenize.zig | ||
host_abi.zig | ||
main.zig | ||
NOTES.md | ||
README.fuzzing.md | ||
README.md | ||
README.profiling.md | ||
reporting.zig | ||
snapshot.zig | ||
test.zig | ||
tracy-shutdown.cpp | ||
tracy.zig | ||
types.zig | ||
zig_llvm.cpp | ||
zig_llvm.h |
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:
- run
zls --version
and make sure it is0.14.0
. - run
zls env
and grab theconfig_file
path. - Edit the config file to include
{
"enable_build_on_save": true,
"build_on_save_args": ["-Dno-bin", "-fincremental"]
}
- 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. - Optionally, add
-Dfuzz
above as well to get type checking of fuzz scripts as well. - Note, I had to fully delete my
.zig-cache
to getzls
to start. Make sure to check the logs if you aren't getting type failures. - 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