Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commit3bb1da2647

README.md

localContent

/source/local/ is the runtime write path: where a running session puts data it produces and wants back later. A recorded gesture, a generated texture, a downloaded pack, a computed cache too big to be worth rebuilding — anything that does not fit the small JSON of runtime_data but should still be there after a restart.

Two properties define it, and they are the reason it exists:

  • It never syncs. Nothing written there reaches a world, a manifest row, or another player. That is what keeps unbounded runtime output off the backend — there is no size cliff to police, because nothing here can reach one.
  • It survives the process. The machine keeps it, per world and per user. It is also the only durable write a shipped runtime build has: that profile never leaves play, and a play-mode write anywhere else under /source/ lands on the play shadow and dies with the process.

It is still ordinary source — an asset folder written there registers, and asset.list finds it — so a session reads its own cache the way it reads anything else.

Which durable store to write to

Both survive a restart. They differ in how far the data travels, and that is the whole choice:

runtime_data/source/local/
shapeJSON leaves, path-keyed, size-boundedfiles and asset folders, any bytes
survives a restartyesyes
follows the user to another machineyes — it replicatesno — this machine only
scopeper world, and per user for runtime_data.playerper world and per user, always

So a player's settings, progress, and small state go in runtime_data, where a new device picks them up. Bulk that a device can produce again or does not need elsewhere — caches, recordings, generated assets — goes in /source/local/, where it costs the backend nothing. A fresh device starts with the first and without the second.

Nothing outside it may reference into it

A world asset that depends on something under /source/local/ resolves for exactly one machine and dangles for every collaborator and every player. The dependency is refused where it would be recorded: it is dropped from the .refs and replaced with an error-severity dep.local_content problem, which refuses the publish.

The other direction is free. Local content names world content as much as it likes, because the world has everything it names.

To make something local into something shared, promote it with persist and reference the copy that lands under /source/.

The three tools

  • list — every path held, with sizes and a total.
  • persist — copy one path into the world, at the same relative path under /source/ unless told otherwise. The local copy stays, so a failed publish never costs the only copy. Edit mode, because that is the mode whose writes persist.
  • forget — stop holding a path. The file goes and the record goes with it, so the next boot does not restore it.

The shape of the work

A world owner runs the head, the session writes what it produces, and later the same world is opened in an editor to decide what becomes part of the world:

zero localContent list
zero localContent persist gestures/wave.json
zero localContent forget cache/scratch-run