Skip to content

codegod100/basic-cli

 
 

Repository files navigation

Roc-Lang

basic-cli

A Roc platform to work with files, commands, HTTP, TCP, command line arguments,...

👀 examples:

📖 documentation:

  • TBA -- roc docs not yet implemented in the new compiler

Running Locally

⚠️ IMPORTANT: This branch (migrate-zig-compiler) requires the new Roc compiler and roc_std_new to be at matching versions to avoid ABI layout mismatches.

Roc Nightly Version

This project uses pre-built Roc nightly releases from roc-lang/nightlies. The pinned nightly version is specified in Cargo.toml via the # roc-nightly: comment and roc_std_new rev.

The CI scripts automatically download the correct nightly based on this configuration. See CONTRIBUTING.md for how to update the Roc version.

Migration Status

This branch migrates basic-cli to the new Zig-based Roc compiler and RocOps ABI.

✅ Completed:

  • All core modules (Cmd, File, Dir, Path, Env, Random, Sleep, Utc, Stdin/Stdout/Stderr)
  • Single-variant tag union layout fix (RocSingleTagWrapper now correctly includes discriminant)
  • Comprehensive testing and verification

Note: Single-variant tag unions (e.g., [PathErr(IOErr)]) are represented in the Roc ABI with a discriminant byte (always 0) even though there's only one variant. The RocSingleTagWrapper<T> type implements this standard Roc ABI layout. This type could potentially be upstreamed to roc_std_new for reuse across platforms.

About

A basic Command-Line Interface platform

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Roc 68.6%
  • Rust 27.9%
  • Shell 2.6%
  • Nix 0.9%