Shipping a game
To share your game, you need a binary that runs on the player’s machine
without Roc, and you need your builds to stay the same over time. rocco
helps with both. Each release gives a bundle for the platform and for each
bundled package, and each bundle has a fixed URL. Your game names those
URLs in its header, and roc downloads them, so Roc is all you need to
build. The binary you build holds the engine and your game together.
If you read this page on GitHub, the bundle URLs and the Roc nightly show as markers in double braces. You can find the values in the notes of the latest release.
The header
This header names every bundle and the Roc nightly:
app [init, launch, loaded, step, view] { cam: "https://github.com/Pixelsprout/rocco-engine/releases/download/v0.6.0/camera-QiJqL4WFPQGUbBCMZ5bzjdLHhgRz7BiUw1ngwxWwHtP.tar.zst", linalg: "https://github.com/Pixelsprout/rocco-engine/releases/download/v0.6.0/linalg-4N62Pw77Sky6ba8RiBfvULjHuAQeQiqHbUor7qSeor7F.tar.zst", mesh: "https://github.com/Pixelsprout/rocco-engine/releases/download/v0.6.0/mesh-5Fmg6uFHADmSBmZxNWDg25VStK6mU7YqhkWEXHjMEGNP.tar.zst", pf: platform "https://github.com/Pixelsprout/rocco-engine/releases/download/v0.6.0/platform-2gvPTPztQ7D8yQsMvRTD4rBKS8VmSwMCPZ432eWzNNtJ.tar.zst", roc: "nightly-2026-10-11-7d256b9", ui: "https://github.com/Pixelsprout/rocco-engine/releases/download/v0.6.0/ui-5msrKWjNRwuEBomX2R1CBFRycCCjrQCPjhEvJXtwWbU6.tar.zst" }Name only the packages that your game imports:
| Name | Bundle | Gives |
|---|---|---|
pf |
https://github.com/Pixelsprout/rocco-engine/releases/download/v0.6.0/platform-2gvPTPztQ7D8yQsMvRTD4rBKS8VmSwMCPZ432eWzNNtJ.tar.zst |
the platform: the vocabulary, Key, Light, Query and the defaults |
mesh |
https://github.com/Pixelsprout/rocco-engine/releases/download/v0.6.0/mesh-5Fmg6uFHADmSBmZxNWDg25VStK6mU7YqhkWEXHjMEGNP.tar.zst |
the mesh package: Mesh.primitive and Mesh.resolve |
ui |
https://github.com/Pixelsprout/rocco-engine/releases/download/v0.6.0/ui-5msrKWjNRwuEBomX2R1CBFRycCCjrQCPjhEvJXtwWbU6.tar.zst |
the ui package: Ui.default_box, Ui.label and Ui.panel |
linalg |
https://github.com/Pixelsprout/rocco-engine/releases/download/v0.6.0/linalg-4N62Pw77Sky6ba8RiBfvULjHuAQeQiqHbUor7qSeor7F.tar.zst |
the linalg package: Vec3, Quat and Pose |
cam |
https://github.com/Pixelsprout/rocco-engine/releases/download/v0.6.0/camera-QiJqL4WFPQGUbBCMZ5bzjdLHhgRz7BiUw1ngwxWwHtP.tar.zst |
the camera package: Cam.look_at and Cam.follow |
Each URL ends with a hash of the bundle. Roc checks the hash, so the files behind a URL cannot change. Take all of the URLs from one release. The ui package copies the UI types of the platform, so URLs from two releases can have types that don’t match.
The Roc nightly
Roc changes from one nightly to the next. The roc field of the header
names the nightly that the release was built with, so install that nightly
and run roc version to check it. To move to a new release, change the
nightly and all of the URLs at the same time.
Build for each target
Roc builds for the OS that it runs on, so build your game on each OS that you ship to. rocco does not test a build for one OS made on a different OS.
| OS | Run this on that OS | Binary |
|---|---|---|
| macOS arm64 | roc build --target=arm64mac --output=./my-game main.roc |
my-game |
| Linux x64 | roc build --target=x64glibc --output=./my-game main.roc |
my-game |
| Windows x64 | roc build --target=x64win --output=./my-game.exe main.roc |
my-game.exe |
A few things to watch for:
- On Linux, always give
--target. Without it,roc buildpicks a static musl target, and the platform has no musl target. roc builduses--opt=speedby default. The binary is fast, but the build is slower than aroc run.- If your game imports the mesh package,
roc buildwarns about thedbginMesh.resolve. Roc then exits with code 2, but it still writes the binary. - On Windows, run
rocin a shell whereLIBis not set.
What to ship
Ship these files together:
- the binary,
- the
assets/folder, next to the binary.
When the player starts the binary by a path, such as ./my-game, it finds
assets/ in its own folder.
The binary loads some libraries of the OS when it starts:
| OS | Libraries |
|---|---|
| macOS | the system frameworks, such as Metal |
| Linux | libX11.so.6, libXi.so.6, libXcursor.so.1, libGL.so.1 and the C library. The player needs an X11 desktop and an OpenGL driver. |
| Windows | ucrtbase.dll, kernel32.dll, user32.dll, gdi32.dll, shell32.dll and d3d11.dll |