Compiled Mux programs link against this library at compile time. It is plain, stable Rust with no LLVM dependency - so runtime and standard-library work needs only a Rust toolchain, not the compiler's LLVM 22 + clang setup.
crates.io is frozen. Versions through 0.5.0 remain published and are not yanked, but no new ones will be.
mux-compilerconsumes this repo as a git dependency onmain, pinned to an exact commit by itsCargo.lock, so merging here is what makes a change available. See ADR 0004.
- Memory allocation and reference counting
- String operations (UTF-8)
- Collections (list, map, set)
- Type conversions and standard-library runtime support
- Optional features:
json,csv,net,sql,sync(see[features]inCargo.toml;fullenables everything and is the default)
cargo build
cargo test --all-features
cargo clippy --all-targets --all-features -- -D warnings
cargo fmtNo LLVM or clang required.
Benchmarks for the hot paths (reference counting, list/map/set, string, JSON) live
under benches/ and use criterion:
cargo bench # run all hot-path benchmarks
cargo bench -- --save-baseline main # save a baseline, then compare a change with
cargo bench -- --baseline main # ... --baseline mainBenchmarks are a local/manual tool and a non-blocking CI report; they never gate a merge (shared CI runners are too noisy for a wall-clock threshold).
The compiler does not import this crate as Rust code - it links the built library
when producing executables. It resolves this repo as a git dependency on main,
pinned to an exact commit by its Cargo.lock, and links the archive cargo builds
into its target/ directory. Producing that archive takes cargo build -p mux-runtime: cargo emits a dependency's rlib and never its staticlib.
For coupled local development, build this repo and point MUX_RUNTIME_LIB at the
resulting target/debug/libmux_runtime.a. That is the first thing the compiler
consults, so it overrides the library cargo built from the locked commit -
which also means a leftover MUX_RUNTIME_LIB will keep overriding it until you
unset it.
The compiler never builds this crate while compiling a Mux program, and always
links the full feature set. Static linking discards archive members nothing
references, so a program that does not touch sql carries no SQLite.
The compiler identifies this repo by commit, not by version: mux version
reports the locked commit as semver build metadata, e.g.
runtime v0.5.0+g4e2dc14. A coupled change is one PR here and one in
mux-compiler - no publish step between them.
The version field in Cargo.toml is inert while crates.io is frozen. Record
changes under an ## [Unreleased] heading in the changelog instead.
Full release steps: muxlang/mux-context release process.
| Repo | What it is |
|---|---|
| mux-compiler | The language, compiler, and CLI that links this runtime |
| mux-website | Docs site (mux-lang.dev) and the language reference |
| mux-website-api | Compile/run API behind the playground |
| tree-sitter-mux | Tree-sitter grammar + highlight queries |
| mux-syntax-highlighting | TextMate grammar, VSCode extension, canonical syntax spec |
| mux-context | Cross-repo architecture, design rationale, glossary, releases |
MIT - Maintained by Derek Corniello
