MASCHINENRAUM/KITS
Maschinenraum · platform study · not built yet

Bring your own room.

What would have to exist so that a player with the nick X could have brought the DJ room into the platform: without a server restart, without breaking anyone else, and without anyone recompiling Rust?
a · meCheaper than prompt, compile, restart, look.
b · ClaudeWork against a schema, a validator and a sandbox, not scene.rs.
c · strangersShip while the server stays up; break nothing already there.
15files for one
book box today
~80%of the DJ room
is declarative
0restarts in
the target design
kits/dj dj@b3:9f2c · pinned
01 · where we stand

A box of links took 15 files.

Rooms, sounds and looks are already content. A new thing is still code smeared across four crates, a wasm rebuild and a restart. The interesting logic in the book box is about 40 lines; the rest is plumbing.

already data

rooms/*.ron, client/sounds/*.snd, client/looks/*.look, the events log, race tracks.

still code

ObjectKind, ObjectState, C2S/S2C, Event, scene::anim, sfx::EV_*: closed enums, all needing a compiler.

  1. Closed enums are the extension points. Append-only for good reasons, and all compiled.
  2. Features live between files. One painter, two light rows, a props height, a few room arms.
  3. The client is one wasm blob. New behaviour means a new bundle and everyone reloads.
  4. Hand-mirrored layouts. WGSL structs and anim ids: change one side and geometry scrambles silently.
  5. One process, one restart. Every connection drops for any code change.
  6. Persistence is per-variant code. Two Event variants, a fold and a replay arm per feature.

Today: the book box15

With kits4

Plus the core seams, built once for every kit: Event::Ext, C2S/S2C::Ext, Object.kit, a KV with ACLs. Checked by mr kit check, no compile.

Each file lands where its job goes.
02 · the proposal

Kits, in three layers over a closed core.

Data first. Sandboxed code where data runs out. Compiled core for what defines the engine. Defaults push down: every effect that becomes popular in a higher layer is a candidate to move into a lower one.

03 · the acceptance test

The DJ room, taken apart.

Each row is something the room needs, independent of how it is built today. The right column says which layer would carry it. Only two needs are honestly code, and both are tiny, pure, deterministic functions.

13/17

needs are plain data, already or as L0 kits. Two need core, and two are code: a retempo rule and the bassline, both pure functions.

04 · the story

X brings the DJ room. Nobody reloads.

From an idea to a room everyone can walk into, with a validator closing the loop and a room instance swapped under the players' feet. Step through it, or let it play.

1 / 9
05 · candidate mechanisms

Every way to run strangers' code, weighed.

Scored 0–5 on what this codebase needs most. Determinism is the deciding axis: the bassline must play the same notes on the server and on every client, like props::step already does. Click a column to sort, a row to look closer.

06 · what a kit looks like

kits/dj/, file by file.

RON for structure, the existing .snd for sound, a mini-notation for patterns, one optional wasm module. for and if are template expansions at load time, never runtime control flow: the output is a flat, budget-checked primitive list, like a painter's output today.


          
        
07 · the server never goes down

Hot-swap rooms, not processes.

Room tasks are already Erlang-like processes owning their own state. A reload builds a fresh room from file, log and the new kit set, then hands every player over exactly like a seam crossing (ConnCtl::Moved). A kit that traps takes down one room instance; a supervisor restarts it on the previous pin, and every other room never notices.

two versions live

Old and new instance coexist until the hand-off finishes, the OTP way.

supervised

Crash → restart from file + log, without the kit, flagged for review.

08 · adjacent technology

What to steal, what to avoid.

Games and platforms that let strangers extend them, mapped by how they let code in. Pick a star.

09 · roadmap

Two to three months to pass the test.

Something useful ships after every phase: the lava lamp as data, the book box as data (delete books.rs), the drums as data, the bassline as wasm (delete disco.rs), then the registry that makes "X brought the DJ room" true. Solid bars are the low estimate, hatching the high one.

10 · to decide

Five calls that shape everything.

Pick an option to see what follows from it. Recommended options are marked; nothing here is saved, it only lives in this page while it is open.

11 · recommendation

Data first, one escape hatch, no restarts.

Generalise what we built twice

Primitives, state with roles and ACLs, panels as schema, patterns and patches. L0 data kits remove most of the 15-file friction and are safe by construction.

wasm as the one escape hatch

Core wasm with a postcard ABI, Extism-style. The same bytes run on server and clients, so shared logic stays in lockstep. No Lua or JS runtimes, no JIT, no dylibs.

Hot-swap rooms

Content-addressed kits pinned by room files. A reload is a new room instance with every player handed over, under a supervisor.

Keep the renderer's identity

Primitives, .vox and SVG in. glTF only offline with edge extraction and budgets. Shader snippets only as a gated, signed, rare L2.

Claude as first-class author

A validator and an MCP server: the roomcheck pattern scaled up, so describe → kit → checked → published happens without a compile.