Skip to content

travisstaloch/roc-cli-platform-zig

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cli-platform-zig

An experimental roc lang cli platform in zig. Adapated from roc's rust cli platform.

dependencies

  • a roc compiler in PATH
  • zig version 0.9.1 in PATH

usage

  1. clone this repo
  2. 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

./test/run.sh # builds and runs test/main.roc and other testing scripts

status

  • 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.

notes

  • 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

todo

  • File.write, delete, ...

contributors

  • bhansconnect@github

About

An experimental roc lang cli platform in zig

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published