An experimental roc lang cli platform in zig. Adapated from roc's rust cli platform.
- a roc compiler in PATH
- zig version 0.9.1 in PATH
- clone this repo
- reference platform/main.roc in your roc app like this:
packages { pf: "path/to/platform/main.roc" }
(see test/main.roc for an example)
./test/run.sh # builds and runs test/main.roc and other testing scripts
- Stdout.line, Stderr.line
- File.readBytes - includes some error handling
- Process.withArgs
- Env.{var,cwd,setCwd,exePath}
see test/main.roc to see what works.
- copied to platform/ from roc repo
- examples/cli/tui-platform/host.zig
- examples/cli/cli-platform/main.roc
- examples/cli/cli-platform/*.roc
- crates/compiler/builtins/bitcode/src/{utils,list}.zig
- File.write, delete, ...
- bhansconnect@github