Rune is pre-release and isn't on crates.io. An app depends on the git repository
at one commit of dev, which is fast-forward-only, so a pinned rev keeps
building. The audited rev of this skill is in sources.md.
Pick the rev
- New app: the newest
devcommit.git ls-remote https://github.com/anomalyco/rune refs/heads/devprints it. Record the SHA and its date in the app's README or manifest comment. - Existing app: keep its rev.
Cargo.lockis the truth (source = "git+https://github.com/anomalyco/rune?rev=…#<sha>"). - Never
branch = "dev"or a bare git dependency: the lock moves when someone runscargo update, and the patch table below drifts out of step.
The manifest
[dependencies]
rune = { git = "https://github.com/anomalyco/rune", rev = "<rev>" }
rune-kit = { git = "https://github.com/anomalyco/rune", rev = "<rev>" } # when chosen
[features]
hot = ["rune/hot"] # live Rust editing
tooling = ["rune/tooling"] # headless flags in release builds
[patch.crates-io]
winit = { git = "https://github.com/anomalyco/rune", rev = "<rev>" }
parley_engine = { git = "https://github.com/anomalyco/rune", rev = "<rev>" }
wgpu-hal = { git = "https://github.com/anomalyco/rune", rev = "<rev>" }
accesskit_windows = { git = "https://github.com/anomalyco/rune", rev = "<rev>" }
- The patch table is mandatory. Rune vendors patched crates and applies them
through its root
[patch.crates-io]. A dependency's[patch]doesn't reach the app's workspace, so the app has to repeat it. The patches carry Rune's macOS input-method, Windows window-creation, bidi and shaping changes, andrunecalls into them: at the audited rev a missing table fails dependency resolution (parley_enginelacks theline-dictionariesfeature) and a missingwinitentry fails to compile (set_ime_textnot found inwinit::platform::macos). At other revs an omission may build and only misbehave, so check rather than rely on the error. The list is Rune's root table at the pinned rev and can change between revs.scripts/check_rune_patches.py Cargo.tomlcompares them;--print-table <rev>prints the right block. - In a workspace, the patch table belongs in the workspace root manifest.
- Every Rune crate is addressed by package name from the same git URL and rev:
rune-kit,rune-motion,rune-fx,rune-light,rune-mac,rune-notify,rune-perf,rune-knobs,rune-i18n,rune-luau. Mixing revs gives two copies ofruneand type errors between them. themes/opencode(rune-theme-opencode) is OpenCode's brand as data. Use it for an OpenCode surface, not as a neutral default; useKit::neutralorKit::from_paletteinstead.- Copy Rune's profiles (
debug = "line-tables-only", dependency debug off, releasecodegen-units = 16,incremental = true); full debug info makes test builds enormous. - Match the toolchain to Rune's
rust-toolchain.tomlat the rev (1.99.1 at the audited rev) or newer. Rune uses edition 2024.
Features worth knowing
rune defaults: accessibility, dbus, embedded-fonts, metal-backend,
ogg-audio, svg.
| Feature | Use |
|---|---|
tooling |
--snap, --tree, --script, --video in release builds (debug always has them) |
keys-overlay |
--keys and --pointer keycaps over headless frames in release builds |
hot |
live Rust editing through rune-hot/rune-dev |
native-file-dialog |
native Open/Save/folder dialogs (rfd, XDG portal on Linux) |
embedded-fonts |
bundled Inter; turn off only when AppSpec::fonts supplies every face |
avif |
AVIF decoding (NASM needed on x86) |
segmenter-dictionaries |
Windows: link ICU word dictionaries instead of icu.dll |
macos-background-cursor |
private API; App Store review may reject it |
frame-profile, alloc-sites |
measurement builds only |
rune-kit adds markdown and mermaid. Read the exact list in
crates/rune/Cargo.toml at the rev; feature names move.
Build prerequisites
- Linux:
libxkbcommon-dev libwayland-dev(Debian/Ubuntu) at build time,libxkbcommon-x11-0to open windows, and a Vulkan driver (mesa-vulkan-driversfor software) to draw. Headless--snapneeds neither display nor XKB. - Windows: MSVC needs only the C++ build tools. The GNU toolchain also needs
MinGW-w64 binutils (
dlltool) onPATH. - Web:
wasm32-unknown-unknown, thewasm-bindgen-cliversion in Rune's lockfile, and Rune'sscripts/web-build.sh; see web. - Video output (
--video):ffmpegonPATH.
Rune's own scripts
scripts/mac-app, scripts/app-audit, scripts/rune-hot, scripts/rune-dev,
scripts/motion-audit and scripts/web-build.sh live in the Rune repository.
Run them from Cargo's checkout of the pinned rev
(~/.cargo/git/checkouts/rune-*/<first 7 of the rev>/scripts/) or a clone at that
rev, so they match the library the app links.
Upgrade a rev
- Read
CHANGELOG.md(## dev) andchangelog/unreleased/between the old and new rev; each entry names what can move an app's output or break its build. - Change every
revtogether: dependencies and patch table. Runcheck_rune_patches.py; add new patch entries Rune added. - Match the toolchain if Rune's moved.
- Build. Rune avoids new public fields on types apps build as literals
(
AppSpec,Env,RunOptions,ScrollSpec,TextStyle,OverlaySpec,Span, …) and adds builder methods instead; endAppSpecliterals with..AppSpec::new(..)so one that slips through doesn't break the app. - Re-render every scene light and dark and compare with the previous renders before accepting the bump. Text, motion and colour can change without a compile error.
Development loop
cargo runopens the window. Pass Rune's flags after--:cargo run -- --snap out.png --scene many.- Headless renders are the fast loop: edit, build, snap, read the PNG. See headless validation.
- Live Rust editing: add
hot = ["rune/hot"], install Dioxus CLI 0.7.10 asdxin Cargo's bin directory (the Homebrewdxis unrelated), then from the Rune checkout:scripts/rune-hot --manifest ../my-app/Cargo.toml --patch 'src/ui/**/*.rs' -- APP ARGS. Function bodies in the patched files reload in the open window; other edits rebuild and relaunch. State lives inAppSpec::init's value; tip-crate statics and thread locals may reset;setupruns once. See restart boundaries.scripts/rune-devwithout--localassumes the maintainers' build workers. - Mac bundle while developing:
scripts/mac-appinstalls and relaunches a built binary as~/Applications/NAME.appwithout the window blinking; see platform delivery.