CARMI (Compiler for Automatic Reactive Modelling of Inference) is an experimental DSL+compiler for reactive state derivation. Current version 1.0.342. It generates JavaScript source code that automatically handles cache invalidation by analyzing which model paths are read/written at compile time, avoiding overhead of traditional FRP or immutable approaches. Key differentiators: zero-overhead conditional dependency tracking, hoisted shared sub-expressions, no tracking when no setters exist, fully incremental computation. Stable but low release cadence (last major update years ago). Ships TypeScript types.
npm install carmiNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Defines a reactive model for a todo list: derived display text, any-not-done flag, and a setter action using compile/eval.
Use eval(compile(modelDefinition)) as shown in docs.
Always use .get('key') to access model properties if you need the value.Replace import { compile } from 'carmi/macro' with import { compile } from 'carmi'.Ensure that the number and order of args match the paths used in setter(arg0, ...).
Change const model = compile(definition); to const model = eval(compile(definition));
Ensure your model definition uses root and paths correctly; verify that the compiled code runs inside eval.
Add import { root } from 'carmi' at top of the file where compile() is called.Use setter(arg0, 'pathToSet') or setter(arg0, arg1) depending on your model depth.
No dependency data recorded yet.