Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commit3bb1da2647

README.md

carried

Content of another world, mounted read-only for this session at /zero/runtime/carried/<key>/ without installing it. A closure is named by the sha-256 of its manifest (closureSha); the engine reads the manifest and every file it names through the device's content cache and lays them out the way their world places them. Nothing a mount holds is content of the open world: no asset listing, dependency table, push or zm status sees it, and the open world's code cannot require from it.

local m = carried.mount(closureSha, { key = "ada.avatar" })
local s = carried.wait(m.key)              -- yields until ready, refused or none
assert(s.state == "ready", s.detail)
print(vfs.read(s.path .. "/chars/ada.avatar/avatar.json"))
print(carried.resolve(m.key, "chars.ada_albedo"))  -- what a reference inside the closure names
carried.release(m.key)                     -- the last holder takes it down

-- Preview an asset of the open world's working tree through the same route:
local d = carried.wait(carried.mountDraft("/zero/source/props/lamp.model").key)

guides { path: "core/carried" } covers the status fields, the builtin versions a closure was built against, and what the open world never sees.