Skip to content

Latest commit

 

History

142 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rocjust

A port of just 1.58.0 to Roc.

The general goal was to allow people to build apps in my (upcoming) UI platform without installing Rust. It's mostly open sourced to act as a fairly sizeable Roc codebase to exercise the compiler.

Status

This is a complete port, passing the upstream integration suite 1830/4 with the four divergences being:

  1. cache::prints_cache_key-v -v -v dumps the cache key. The port hashes a different encoding than upstream's serde JSON.

  2. changelog::print_changelog (--changelog) — upstream embeds a ~5k-line changelog via include_str! at build time.

  3. man::output (--man) — upstream embeds a clap-generated man page at build time, which the port doesn't reproduce.

  4. settings::bad_regex — a regex comparison in a set value (e.g. '' =~ '(') folds and fails at settings-evaluation time upstream via the regex crate. basic-cli has no pure regex, so the port makes matching an effect — the setting is left unevaluated and a bad pattern there goes unreported.

Building

git submodule update --init --recursive

1. Build the platform host

roc build links seahaven's host static library.

cd seahaven
cargo xtask sysroot # If you're on Mac, framework stubs the roc linker needs (once)
cd brush-roc-host
CARGO_PROFILE_RELEASE_LTO=off cargo build --release    # -> target/release/libhost.a
cp target/release/libhost.a ../platform/targets/arm64mac/libhost.a

2. Build the CLI

roc build app/main.roc               # links against seahaven (~4 min at the default --opt=speed)

Testing

(cd just && roc test Test.roc)       # the pure package gate — no platform, no effects
python3 harness/diff.py              # differential against a `just` built from source

The package tests run inside the just/ package (a cross-package roc test miscompiles on this toolchain). harness/diff.py builds the reference just from source and diffs the port against it across the corpus.

About

A Roc port of the just task runner

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages