Repository navigation
Rive SDK Submodules
Deployments never need these. They are marked
update = none, sogit clone --recurse-submodules— what Dokploy, Coolify and similar platforms run — skips them. OpenRive runs on the published@rive-app/canvas-advanced; the submodules only matter when you want to build the runtime yourself. Fetch them withbun run rive:init, which also rewrites Rive's ownssh://submodule URL to https so no SSH key is needed.
OpenRive renders with Rive's own runtime. By default that is the published npm package
@rive-app/canvas-advanced; the WASM and its loader are copied into apps/web/public/rive on install so the editor
works offline.
Two forks of Rive's repositories are vendored as git submodules so the SDK itself can be read, patched and rebuilt:
| Submodule | Fork | Upstream | What it is |
|---|---|---|---|
vendor/rive-wasm |
UpstandPlatform/rive-wasm | rive-app/rive-wasm | The JS/WASM SDK that builds @rive-app/canvas-advanced — the runtime the editor renders with |
vendor/rive-runtime |
UpstandPlatform/rive-runtime | rive-app/rive-runtime | The low level C++ runtime and renderer that rive-wasm compiles |
Both are MIT licensed, as is the fork of each.
| Command | What it does |
|---|---|
bun run rive:status |
Shows what is checked out, what is built, and which runtime the editor uses |
bun run rive:init |
Clones/updates the submodules and adds the upstream remotes |
bun run rive:update |
Fast-forwards each fork onto rive-app's latest, then tells you what to push |
bun run rive:build |
Builds the WASM runtime from vendor/rive-wasm
|
bun run rive:sync |
Makes the editor render with that build |
bun run rive:npm |
Goes back to the published npm runtime |
They all live in scripts/rive-sdk.ts.
A fresh clone does not fetch them. Either clone with them:
git clone --recurse-submodules https://github.com/UpstandPlatform/OpenRiveor add them afterwards:
bun run rive:initNothing else in OpenRive needs them: without the submodules the editor still renders with the npm runtime.
bun run rive:update # fetch rive-app and fast-forward each fork
git -C vendor/rive-wasm push origin master
git -C vendor/rive-runtime push origin main
git add vendor && git commit -m "chore: update Rive SDK submodules"rive:update never pushes for you, and stops at a fork that has diverged (because you committed your own changes to
it) so you can merge by hand.
The commit each submodule points at is part of this repository's history, so everyone who runs rive:init gets the
same SDK.
Building the WASM runtime needs Emscripten and rive-wasm's own submodules:
git -C vendor/rive-wasm submodule update --init --recursive
bun run rive:build # runs vendor/rive-wasm/js/build.sh
bun run rive:sync # copies the build into apps/web/public/rive/localrive:sync writes apps/web/public/rive/runtime.json with "source": "submodule". From then on:
-
apps/web/src/lib/runtime.tsloads/rive/local/canvas_advanced.mjsinstead of the npm package, so the stage, the preview and the player all use your build, - offline preview bundles ship your build too,
-
bun installleaves it alone (scripts/copy-wasm.tsrefuses to overwrite it).
Restart the dev server after syncing. bun run rive:npm deletes the local build and restores the npm runtime.
Everything under apps/web/public/rive/local/ and runtime.json is git-ignored: a custom runtime stays on the machine
that built it, and what ships is the submodule commit plus the build instructions.
| Path | Role |
|---|---|
vendor/rive-wasm, vendor/rive-runtime
|
The forked SDKs (git submodules) |
scripts/rive-sdk.ts |
The rive:* commands |
scripts/copy-wasm.ts |
Copies the npm runtime into public/rive on install |
apps/web/public/rive/runtime.json |
Which build is active |
apps/web/src/lib/runtime.ts |
Loads the active build in the browser |
apps/web/src/lib/server/riveRuntime.ts |
Finds the active build for preview bundles |
This page is generated from docs/rive-sdk.md. Suggest an edit.
OpenRive · MIT License ·
Report a bug ·
Request a feature ·
This wiki is generated from the repo's docs/, contribution/ and wiki/ folders. Edit those, not the wiki.
Get started
Tutorials
Using OpenRive
- User Guide
- Keyboard Shortcuts
- Templates
- Theme Colors
- Data Binding
- Text and Assets
- Code Panel
- Preview Bundles
- Users and Roles
- Accounts and Sign-in
Self-hosting
Automation
Under the hood
Contributing