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
| Package | Role |
|---|---|
@loom-dev/preview | The 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-dev | The 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
| Package | Owns |
|---|---|
@loom-dev/scene | The Scene IR types, the contract every other package is written against. Mirrors the loom-scene Rust crate. |
@loom-dev/layout | A typed async wrapper over the WASM layout engine: initLayout(), computeLayout(scene, viewport). |
@loom-dev/runtime | Roblox datatypes, the Instance model, signals, services, the scheduler, and the Luau standard library. |
@loom-dev/renderer | Scene IR to DOM, the incremental patching session with pointer and keyboard input, and the font registry: registerFont, onFontsChanged, clearRegisteredFonts, familyIsAvailable. |
@loom-dev/react | The @rbxts/react adapter: a custom react-reconciler host config driving live loom instances. |
@loom-dev/vide | The 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.
| Specifier | What it is |
|---|---|
@loom-dev/preview/vite | The Vite plugin. Always import it by this bare specifier. A file path moves the anchor it resolves its aliases from. |
@loom-dev/preview/globals | The Roblox datatype globals, as a side effect. Only needed on a hand-rolled build the plugin can’t see. |
@loom-dev/renderer/fonts | The 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/embed | createGalleryServer(), buildGallery(), findGalleryTargets(): the CLI’s two pipelines as functions. See the CLI reference. |
loom-dev/next | The Next.js config wrapper around the same two pipelines. |
The Rust half
| Crate | Owns |
|---|---|
loom-scene | Scene IR types and schema. @loom-dev/scene mirrors it. |
loom-layout | The layout engine. |
loom-layout-wasm | A 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/*.wasmNothing 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:
| App | Shows |
|---|---|
apps/example | The minimal roblox-ts client entry the CLI auto-detects. No config of any kind. |
apps/interactive | A vite.config.ts holding only loomPreview(), and no index.html. Also input and signal wiring. |
apps/gallery-demo | loomPreview({ targets }) over *.loom.tsx scenes, including one that throws on purpose to show error containment. |
apps/playground | The same plugin with its own hand-written index.html. |
apps/vide-example | The same pipeline driven by vide instead of React. |