Loomreference

Packages

The @loom-dev scope — what each package owns, which ones you install, and the boundaries between them.

You install two packages. The rest of the scope is published so the dependency graph resolves, and you never import it directly.

What you install

PackageRole
@loom-dev/previewThe Vite plugin, with the generated page, entry detection, gallery discovery and the gallery shell. Also the browser stand-ins for @rbxts/react-roblox and @rbxts/services, and the globals installer.
loom-devThe loom CLI (preview and build, flags, loom.config.ts) and the loom-dev/embed and loom-dev/next APIs. A wrapper over the plugin.

The rest of the scope

PackageOwns
@loom-dev/sceneThe Scene IR types, the contract every other package is written against. Mirrors the loom-scene Rust crate.
@loom-dev/layoutA typed async wrapper over the WASM layout engine: initLayout(), computeLayout(scene, viewport).
@loom-dev/runtimeRoblox datatypes, the Instance model, signals, services, the scheduler, and the Luau standard library.
@loom-dev/rendererScene IR to DOM, the incremental patching session with pointer and keyboard input, and the font registry: registerFont, onFontsChanged, clearRegisteredFonts, familyIsAvailable.
@loom-dev/reactThe @rbxts/react adapter: a custom react-reconciler host config driving live loom instances.
@loom-dev/videThe vide signals adapter, on the same Scene IR.

Secondary entry points

vite is an optional peer of @loom-dev/preview. The /client, /globals and /services entries work without it.

SpecifierWhat it is
@loom-dev/preview/viteThe Vite plugin. Always import it by this bare specifier. A file path moves the anchor it resolves its aliases from.
@loom-dev/preview/globalsThe Roblox datatype globals, as a side effect. Only needed on a hand-rolled build the plugin can’t see.
@loom-dev/renderer/fontsThe openly licensed Roblox typefaces, registered on import. The preview imports it for you. It is a separate entry so a project embedding the adapters directly can opt out. See Fonts and text metrics.
loom-dev/embedcreateGalleryServer(), buildGallery(), findGalleryTargets(): the CLI’s two pipelines as functions. See the CLI reference.
loom-dev/nextThe Next.js config wrapper around the same two pipelines.

The Rust half

CrateOwns
loom-sceneScene IR types and schema. @loom-dev/scene mirrors it.
loom-layoutThe layout engine.
loom-layout-wasmA wasm-bindgen wrapper around loom-layout, built with wasm-pack --target web.

@loom-dev/layout ships the WASM binary prebuilt. You never need a Rust toolchain.

Dependency direction

loom-dev ──► @loom-dev/preview ──► @loom-dev/react ──► @loom-dev/renderer ──► @loom-dev/scene
│ │
└──► @loom-dev/runtime└──► @loom-dev/layout ──► pkg/*.wasm

Nothing below @loom-dev/react knows a frontend framework exists. That is why the vide adapter sits beside the React one with no changes to the layout engine or the renderer.

The gallery shell lives in @loom-dev/preview, not the CLI. Gallery mode is a plugin option, loomPreview({ targets }), and the CLI is one of its callers. loom-dev keeps only argument parsing, loom.config.ts and the embed API.

Versioning

All @loom-dev/* packages are released together at one version. Keep them on the same version: mixing versions across the scope is not supported.

Example apps

The loom repository has small apps you can copy from:

AppShows
apps/exampleThe minimal roblox-ts client entry the CLI auto-detects. No config of any kind.
apps/interactiveA vite.config.ts holding only loomPreview(), and no index.html. Also input and signal wiring.
apps/gallery-demoloomPreview({ targets }) over *.loom.tsx scenes, including one that throws on purpose to show error containment.
apps/playgroundThe same plugin with its own hand-written index.html.
apps/vide-exampleThe same pipeline driven by vide instead of React.