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.
This is a complete port, passing the upstream integration suite 1830/4 with the four divergences being:
-
cache::prints_cache_key—-v -v -vdumps the cache key. The port hashes a different encoding than upstream's serde JSON. -
changelog::print_changelog(--changelog) — upstream embeds a ~5k-line changelog viainclude_str!at build time. -
man::output(--man) — upstream embeds a clap-generated man page at build time, which the port doesn't reproduce. -
settings::bad_regex— a regex comparison in asetvalue (e.g.'' =~ '(') folds and fails at settings-evaluation time upstream via theregexcrate. 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.
git submodule update --init --recursiveroc 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.aroc build app/main.roc # links against seahaven (~4 min at the default --opt=speed)(cd just && roc test Test.roc) # the pure package gate — no platform, no effects
python3 harness/diff.py # differential against a `just` built from sourceThe 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.