| Crates.io | core-mumu |
| lib.rs | core-mumu |
| version | 0.9.0-rc.5 |
| created_at | 2025-07-01 03:21:09.640748+00 |
| updated_at | 2025-10-13 14:27:42.726725+00 |
| description | MuMu/Lava core interpreter and REPL (engine + optional host features) |
| homepage | https://lava.nu11.uk |
| repository | https://gitlab.com/tofo/core-mumu |
| max_upload_size | |
| id | 1732686 |
| size | 889,227 |
MuMu doesn’t embed into apps, apps embed into MuMu.
The language is the platform; plugins are compiled software that adopt MuMu’s rules and interoperate by construction.
Repository: https://gitlab.com/tofo/core-mumu · Homepage: https://lava.nu11.uk
License: MIT OR Apache-2.0
MuMu is the host runtime and Lava is the language. Both are contained in core-mumu
Value/FunctionValue and first‑class functionsMixedArray^ for scoped mutables; #name = array deep‑freezes contentTypeName @ expr casts (right‑associative); assignment is an expression_ placeholdersextend("ns")) with namespace reservation and dynamic registry safetyProduces one binary: lava (CLI + REPL)
MuMu is a small core. Everything else is software that compiles into the runtime as a plugin and adopts MuMu’s calling & typing rules.
+---------------------+ +------------------------------+
| Lava CLI / REPL | | Guests (compiled plugins) |
| include(), extend()|---->| array:, math:, flow:, av:, |
| history/autocomplete | sqlite:, … |
+---------------------+ | register_all + Cargo_lock |
| +------------------------------+
v
+--------------------------+
| Core Runtime |
| - Value/FunctionValue |
| - namespace reservation |
| - dynamic registry |
| - parser/interpreter |
+--------------------------+
Why this is unique in practice
_), one value space (typed arrays, keyed maps), one error shape (KeyedError)interp.register_dynamic_function("array:map", func);
interp.set_variable("array:map",
Value::Function(Box::new(FunctionValue::Named("array:map".into()))));
extend("…"):
#[no_mangle]
pub unsafe extern "C" fn Cargo_lock(interp: *mut c_void, _extra: *const c_void) -> i32 {
register_all(&mut *(interp as *mut Interpreter)); 0
}
_ where natural; data‑last ergonomics for transformsIntArray / Float2DArray / …); MixedArray when heterogeneousKeyedError; truthiness matches core rulesextend("ns") reserves ns:*; don’t overwrite other dynamicsFollow this and your software becomes part of the language — not an add‑on.
(x,y)=>… with capture; partials by default; _ placeholders anywhereType @ expr (right‑associative): scalar/array/matrix/mixed/regex/undefined${…} (nested OK); regex /…/imsx~, ternary ?:, prefix/postfix ++/--^ to declare scoped mutables; #name = array deep‑freezes contenthost): REPL + dynamic loading + host helpers (flow:h*)wasm): same language/runtime; host‑only surfaces return “unavailable”Environment knobs:
LAVA_VERBOSE=1 — verbose bridges/REPLLAVA_TIMING_VERBOSE=1 — poll/await/drop timingLAVA_AWAIT_MAX_MS=<ms> — cap idle‑await loopLAVA_UNLOAD_PLUGINS=1 — dlclose plugins at shutdown (default is leak‑on‑exit to avoid buggy dtors)src/
main.rs, lib.rs
parser/
lexer.rs, ast.rs, core/{precedence,primary,stmt,driver}.rs
interpreter/
core.rs (scopes, dyn registry, namespace reservation)
eval/{expr,statement,regex,indexing}.rs
apply.rs, lambda.rs, partial.rs, array_runtime.rs, numeric.rs, utils.rs
modules/
compose.rs, type.rs, slog.rs, sput.rs, step.rs, include.rs, try.rs, flow_host.rs
modules/repl/
core/{parse,helpers,print,main_loop}.rs, input.rs, autocomplete.rs, render.rs
examples/ tests/
One language → many compiled guests → zero impedance mismatch.
Batch jobs, REPL sessions, streaming pipelines (flow:), audio (av:), databases (sqlite:) — all share MuMu’s values, partials, and errors, so they compose like built‑ins.
@tofo)core-mumu, array-mumu, math-mumu, flow-mumu, av-mumu, sqlite-mumuDual‑licensed under MIT OR Apache‑2.0
SPDX-License-Identifier: MIT OR Apache-2.0