Build and publish
rudder module build # generate, then build <directory>.wasmrudder module publish # build, upload a dev build and put it on stagingrudder module publish --release # the same with the version of manifest.json as it isrudder module build [--allow-breaking] [directory] generates the code, compiles
<directory name>.wasm and writes the built manifest next to it as
<directory name>.manifest.json.
The first build downloads the compiler it needs once into the cache of your user, checked against its checksum, and later builds reuse it. A module is about half a megabyte.
Publish
Section titled “Publish”rudder module publish [--release] [--allow-breaking] [directory] builds, then uploads the
module, its built manifest and its samples to the project chosen with rudder project use (or
--project), puts the version into the draft and publishes it to staging. You must be signed
in as an owner or editor of the project. It prints:
published bonus 0.1.0-dev.3 for the projectinstalled into the draftstaging is at version 12Dev builds
Section titled “Dev builds”While you work on a version, each publish is a dev build of the version of
manifest.json: Rudder numbers it, so 0.1.0 is published as 0.1.0-dev.1, then
0.1.0-dev.2, and you try every change on staging without raising the version. When the
version is done, rudder module publish --release publishes it as 0.1.0 and puts it on
staging the same way, so what you promote is what ran on staging.
- A release of staging that holds a dev build is never promoted to production. The Dashboard
marks it dev and disables its Promote; publish the version with
--releasefirst. Rolling staging back to any release stays possible. - Once
0.1.0is released, a dev build of it is refused with exit 5,version_behind:bonus 0.1.0 is released, set version to 0.1.1. The same holds for any newer released version of the line. - The marketplace, Update and
rudder module installwithout a version skip dev builds;rudder module install [email protected]installs one by its version. A range such as^0.1takes the dev builds of its own line. - A version with a prerelease of your own, such as
0.2.0-rc.1, is published with--releaseonly, and a prereleasedev.Nis never yours to publish. - Dev builds are kept, like every published version.
Staging
Section titled “Staging”The release publish makes is the newest release of staging with this module put in, with the
modules it requires that the draft lacked and the starting rows of its new single catalogs;
anything else you changed in the draft waits for Publish the draft in the Dashboard. A
project without a release of staging gets the whole draft as its first release. The rows of a
catalog the version no longer declares are left out of the release.
When the rows of staging do not fit the new version, publish exits with 5,
release_refused, and prints the problems; neither the draft nor staging changes. Fix the rows
in the Dashboard (or the module) and publish again.
publish works on staging only: with the environment prod in rudder.json (or
--environment prod) it exits with 2. Production gets a release of staging by Promote on
Develop → Releases of the Dashboard.
- Once Rudder accepted a version published with
--release,publishwritesrudder.lock.jsonnext to the manifest (see Compatibility); commit it. A dev build writes norudder.lock.json. Every upload carries the contract of the version, and Rudder refuses a version that breaks the contract of its version line. - A version is published once and never changes.
- A module of a project cannot take the name of a marketplace module.
- The build of a module is at most 16 MB.
- An upload is refused when the manifest needs a newer platform than the one that runs it.
rudder module install <module> puts the newest released version that fits the draft into it
without publishing anything, with the modules it requires, and prints the problems of the
catalogs after the change. Install and Update on Develop → Modules of the Dashboard
do the same. Then check the game on staging and Promote the release to production.
Compatibility
Section titled “Compatibility”Shipped game builds and other modules rely on what a module published. rudder module publish --release records it in rudder.lock.json; before the first release there is no such file and
anything may change. It holds every field with its type, period, owner and value schema, every function with its
kind, server, export and the schemas of its arguments and result, and the payload of every
event and timer. Generation, and so test, build and publish, compares the module with it
and refuses a breaking change with exit 5, incompatible_contract:
- a field removed, or its type, period, owner,
fastortotalchanged, or its value schema changed incompatibly; - a function removed, its kind changed, made
server,exportremoved, arguments or result added or removed or changed incompatibly, or a property of its arguments made required; - an event or a timer removed, a timer moved between the player and the shared type, or a payload changed incompatibly.
New fields, new functions and new optional properties are always fine. Rudder does not convert
the data kept under a changed field: a field that turned fast on or off starts empty.
Version lines
Section titled “Version lines”Rudder keeps the contract of every published version and checks each upload against it too,
whatever the CLI was told. Versions follow semantic versioning by line: 0.3.x is one line for
0.x, 1.x is one line from 1.0.0 on.
- Inside a line a version must stay compatible with the newest earlier version of the line
that is not a prerelease. A breaking change is refused with exit 5,
incompatible_contract, naming what broke and the version to publish instead:bonus 0.3.5 breaks the contract of 0.3.4: function "claim" disappeared; publish 0.4.0 to break the contract. - The first version of a new line may break the contract: publish
0.4.0(or2.0.0) with--release --allow-breaking, which skips the local check and rewritesrudder.lock.jsonafter the upload.--allow-breakingnever lets a breaking version into an existing line. - Dev builds and other prereleases are never compared with:
0.4.0-dev.1,0.4.0-dev.2and0.4.0may each break the one before,0.4.1is checked against0.4.0, and0.3.5-dev.3against0.3.4. - In a fresh clone without
rudder.lock.json,publishchecks the module against the contract of the newest published version of its line before the upload, and Rudder checks it again.
Marketplace modules
Section titled “Marketplace modules”rudder module publish --shared publishes a module to the marketplace of every project. Only
Rudder publishes there. With a project in rudder.json (or --project) the version also goes
into that project and onto its staging, and into no other project.