Build Command
The build command compiles your Balius project into a WebAssembly component that can be executed by the Balius runtime.
Usage
cargo balius buildProcess
The build command performs the following steps:
- Executes
cargo buildwith thewasm32-unknown-unknowntarget - Converts the generated
.wasmfile into a WebAssembly component usingwasm-tools
What It Does
This command:
- Compiles your project to WebAssembly targeting
wasm32-unknown-unknown - Locates the built
.wasmfile in your target directory - Uses
wasm-toolsto convert it into a component WebAssembly file with the name format{package_name}-c.wasm
Requirements
- WebAssembly target support in your Rust toolchain (install with
rustup target add wasm32-unknown-unknown) - The
wasm-toolscommand-line utility must be installed in your path
Build Outputs
After running the build command, you'll find:
- A standard WebAssembly file at
./target/wasm32-unknown-unknown/debug/{package_name}.wasm - A component WebAssembly file at
./{package_name}-c.wasmin your project root directory
Next Steps
After building your project:
- Test it with
cargo balius test - Deploy your WebAssembly component to a Balius runtime