Cargo Mero
Cargo Mero is a Cargo subcommand for building applications on the Calimero network.
Installation
You can choose to install cargo-mero
via cargo or from source.
- Cargo
- From Source
If you use have Rust installed, you can install cargo-mero
directly with the following
steps:
-
Install the cli via cargo:
cargo install cargo-mero --git https://github.com/calimero-network/core.git
-
Verify the installation:
cargo mero --version
If the version number appears, the installation was successful.
Steps
-
Open your terminal and run:
git clone https://github.com/calimero-network/core.git
cd core
cargo install --path crates/cargo-mero -
Verify the installation:
cargo mero --version
If the version number appears, the installation was successful.
Make sure ~/.cargo/bin
is in your PATH
so that cargo mero
is available as
a subcommand.
Usage
cargo mero <COMMAND>
Commands
new
Scaffold a new Calimero application.
cargo mero new <app-name>
Examples:
# Create a new application called "kv-store"
cargo mero new kv-store
# Create a new application called "dao-app"
cargo mero new dao-app
build
Build your Calimero application to WASM.
cargo mero build [OPTIONS]
Build Options:
Option | Description |
---|---|
--locked | Assert that Cargo.lock will remain unchanged |
--no-release | Build app in dev profile, without optimizations |
-v , --verbose | Use verbose output |
-q , --quiet | Do not print cargo log messages |
-F , --features | Space or comma separated list of features to activate |
--no-default-features | No default features |
-p , --package | Package to build |
-h , --help | Print help |
Examples:
# Basic build
cargo mero build
# Build with verbose output
cargo mero build --verbose
# Build in development mode
cargo mero build --no-release
# Build with specific features
cargo mero build --features test,debug
# Build a specific package
cargo mero build --package my-app
help
Prints the help message or the help of the given subcommand(s).
cargo mero --help
cargo mero <COMMAND> --help
Next Steps
After building your application with cargo mero build
, you can:
- Install on a node: Use
meroctl app install
to deploy your built application - Create contexts: Use
meroctl context create
to set up application networks - Test locally: Use the development profile for faster iteration
- Deploy to production: Use the release profile for optimized builds