Hazel

Publishing Plugins

How a native plugin goes from a folder on your machine to something anyone can install from the Marketplace, and what happens to it with every engine build after that.

1. Develop it

  1. Create a directory under the editor's plugins/ folder, with a Cargo.toml (crate-type = ["dylib"]) and a src/lib.rs ending in renzora::plugin!(MyPlugin) or renzora::plugin!(MyPlugin, Runtime).
  2. Launch the editor. It compiles the plugin against its own SDK and loads it. Edit src/ and relaunch: the plugin rebuilds whenever its source or the engine changes.
  3. A failed build is written to plugins/<name>/build/build.log and named under Settings > Editor > Plugins. Never run cargo build in the plugin's folder; see Native Plugins.

2. Describe it

Publishing reads the crate's own Cargo.toml. Name, version and description come from [package], exactly as cargo reads them; everything the Marketplace needs beyond that lives under [package.metadata.renzora], a section cargo ignores. One manifest means the version you bump to release is the version that ships.

[package]
name = "my_plugin"
version = "1.0.0"
edition = "2021"
description = "What it does, in a sentence or two."

[lib]
crate-type = ["dylib"]

[package.metadata.renzora]
marketplace_id = "my_plugin"      # required: the listing's permanent id
category = "plugins"              # required
tags = ["editor", "tools"]        # at most 5
price_credits = 0                 # 10 credits = $1.00; 0 or absent = free
min_engine_version = "r1-alpha8"  # oldest engine release it supports
KeyMeaning
marketplace_idRequired. The listing's identity across the whole registry: claimed on first publish, never changed, and the only thing a publish matches on. It is also what prebuilt binaries are filed under.
categoryRequired. plugins (or plugin) makes the upload buildable source; renzora publish --list-categories prints the current set. A plugin is always stored as one archive, since the editor builds those bytes.
subcategoryOptional, lowercase.
tagsAt most 5, each at most 32 characters, lowercased on publish.
price_creditsNot negative. An asset with credit_name set must be free.
min_engine_versionAn engine release tag. The editor will not offer this release to anyone on an older engine.
nameA listing title, when it should differ from the crate name. Only a stated title overwrites an existing listing's title.
licence (or license_id)One of standard, extended, cc0, mit, apache2, gpl3. Falls back to the [package] licence when it maps to one.
thumbnail, screenshots (at most 10), video, audioPaths relative to the plugin folder; each must exist.
credit_name, credit_url, ai_generatedAttribution.
include, excludeGlob patterns for what goes into the archive.
metadataFree-form extra listing metadata.
unsupported-targetsNot a publishing key: the lean exporter reads it to know which targets this plugin cannot build for (["wasm32"]).

Count the tags. renzora publish rejects a sixth (at most 5 tags (found 6)) before it uploads anything, and that check only runs when you actually publish, so nothing catches it while you develop.

An unknown key under the section is reported as a warning rather than an error, because the section is shared with other tools; a misspelled key does nothing at all, so read the warning.

3. Publish it

Publishing is a command of the separately installed renzora CLI (cargo install renzora):

renzora login                 # store an API token, minted at renzora.com/developers
renzora publish --dry-run     # package and validate, upload nothing
renzora publish               # from the plugin's folder

renzora publish validates the manifest, packages the directory into one zip, and either creates the listing or adds this version as a new release of the listing you already own. A published version is never overwritten: to update, bump version and publish again. Publishing a version behind the listing's current one needs --allow-older.

Other useful flags: --notes / --notes-file for release notes (by default this version's section of CHANGELOG.md), --repo <url> [--ref <ref>] to publish a git commit rather than the working directory, --all to publish every directory with a manifest one level under a path, and --yes to skip the confirmation.

Users who have the plugin are told about the new version. Users on an older engine keep being offered the newest release whose min_engine_version they satisfy.

The engine's own plugin repository

Plugins in renzora/plugins are published by that repository's own workflow rather than by hand. When the engine publishes a nightly or a release, its plugins job dispatches an engine-release event to renzora/plugins (this needs the engine repository's PLUGINS_DISPATCH_TOKEN secret), which runs that repository's publish for the new build. As with renzora publish, a version that is already published is never replaced, so bumping version is what makes a change ship. The dispatch step is not fatal, so a missing token shows only as a warning in that job's log.

4. Prebuilt binaries

A native plugin normally compiles on the machine that installs it, which needs the SDK unpacked and a Rust toolchain. On an official nightly or release it does not have to: every copy of that build has the same engine images and therefore the same stamp, so the engine's CI compiles each Marketplace plugin once per platform and the Marketplace serves the result.

What the editor does on install

Install in the editor installs the plugin's source, then asks the Marketplace for a binary built for this exact engine stamp and platform (GET /api/prebuilt-plugins/<asset id>?engine=<stamp>&platform=<platform>). If one exists and passes every check below, it is written where a source build would have put the library, and loads on the next start with nothing compiled. Otherwise the plugin compiles from source and the install says why. Ticking Build from source in the install dialog compiles even when a binary exists.

The source is always installed as well: the lean exporter compiles plugins into a game from source, and it is what the plugin is rebuilt from on any build with no binary.

After an engine update every installed plugin is out of date. The setup pass on the first launch asks for each Marketplace plugin's binary for the new build, and compiles only those that have none. A plugin is asked about once per build, so a missing binary never reopens the setup pass on every launch.

A build you made yourself with cargo renzora has a stamp no binary carries, so it compiles every plugin from source without being told to. An official build writes its stamp to plugins/engine-stamp.txt beside the executable, so it is known before the SDK is unpacked.

Platforms use the dist/ names: windows-x64, windows-arm64, macos-x64, macos-arm64, linux-x64, linux-arm64.

What makes a binary trustworthy

A prebuilt is a native library mapped into the editor's own process, so renzora_plugin_build::prebuilt accepts it only when all of these hold:

CheckWhat it stops
CI's Ed25519 signature over the binary's statement (plugin id, version, platform, engine stamp, SHA-256, size) verifies against a key compiled into the engineA binary CI did not build. The Marketplace never holds the private key, so a compromised Marketplace can withhold binaries but cannot make an editor accept one of its own.
The statement names the plugin and version whose source was just installedA validly signed binary of another plugin or version served in its place
The statement is for this platform and this engine stampA binary for another OS or another build
The downloaded bytes match the statement's size and SHA-256Corruption or tampering
The library's own ABI record names this buildA mislabelled binary

Any failure means the binary is not written and the plugin compiles from source.

The trusted public keys are in crates/renzora_plugin_build/prebuilt_public_keys.txt, one hex key per line. With none listed (a fork, for instance) every prebuilt is refused and plugins install from source.

How CI builds them

  • Plugins in renzora/plugins: on a nightly or release, each desktop lane runs the plugin check it already runs (check_plugins) with --emit, writing every plugin that builds against that lane's SDK with a signed statement. The prebuilts job in .github/workflows/build-engine.yml uploads them to POST /api/prebuilt-plugins/upload once the release is published.
  • Third-party plugins: .github/workflows/third-party-plugins.yml, run after published nightlies and releases, by plugin-release.yml when a creator publishes a release (dispatched by renzora.com; it builds against the latest nightly and the latest stable release), or by hand.

Compiling a crate runs its code (build.rs, proc macros), so third-party plugins compile in isolation:

JobSecretsRuns plugin codeDoes
listMarketplace tokennoAsks build-list which release of each plugin the engine version installs, and fetches each source
sdknonenoTakes the SDK out of the official release and builds the unpack_sdk and check_plugins tools, per platform
buildnone, permissions: {}yesOne fresh machine per plugin per platform: unpack the SDK, compile, keep the library and the compiler output
publishsigning key, Marketplace tokennoSigns each library from facts it established itself (listed id and version, the job's platform, the SDK's stamp, a hash it measures), uploads it, and records every result with build-result

A signature therefore means "built by Renzora's CI from the source the creator uploaded, against this official build". It is not a code review: a plugin is native code with the editor's full privileges either way, so install plugins from creators you trust.

When a plugin stops compiling against a new build, its listing records the failure per platform and its creator sees the compiler output on renzora.com. The usual cause is an engine API change: fix it, bump the version and publish, and the new release is compiled against the latest builds.

Signing keys (maintainers)

Create the key pair once. The secret goes straight into the CI secret and is never printed or written to disk; the public key is appended to the keys file, to commit:

cargo run --profile dist -p renzora_plugin_build --example prebuilt_keygen -- \
    --public-out crates/renzora_plugin_build/prebuilt_public_keys.txt \
  | gh secret set PREBUILT_SIGNING_KEY --repo renzora/engine

CI also needs RENZORA_MARKETPLACE_TOKEN on the engine repository (secrets are per repository). To rotate, run the command again (it appends), ship a release carrying both keys, and only then remove the old one, so binaries signed with it stay installable until they are replaced.

To build and sign locally against your own SDK, for testing:

PREBUILT_SIGNING_KEY=<hex secret> cargo run --profile dist -p renzora_plugin_build \
    --example check_plugins -- --sdk dist/windows-x64/sdk --plugins ../plugins --emit out/

See also