Lunatic is detected if both
Cargo.tomlfile is found and
runner = "lunatic"
[build] target = "wasm32-wasi" [target.wasm32-wasi] runner = "lunatic"
By default the latest stable version of Rust available in this rust-overlay is used. The version can be overridden with either
- setting the
cargo build --release
The binaries get .wasm suffix and will be ran with the lunatic runtime.
If your project has multiple binaries, you can specify which one to run with the
NIXPACKS_RUST_BIN environment variable. Optionally, it can be overriden with the
default_run property in
Cargo.toml under the
These directories are cached between builds
Nixpacks will auto-detect if you are using Cargo Workspaces. This checks
workspace.default_members first and then
workspace.members. It also respects the
To set which workspace Nixpacks will build, just set the
NIXPACKS_CARGO_WORKSPACE environment variable and Nixpacks will use it as the