Skip to main content
Version: Next

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.

If you use have Rust installed, you can install cargo-mero directly with the following steps:

  1. Install the cli via cargo:

    cargo install cargo-mero --git https://github.com/calimero-network/core.git
  2. 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

Terminal
cargo mero <COMMAND>

Commands

new

Scaffold a new Calimero application.

Terminal
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.

Terminal
cargo mero build [OPTIONS]

Build Options:

OptionDescription
--lockedAssert that Cargo.lock will remain unchanged
--no-releaseBuild app in dev profile, without optimizations
-v, --verboseUse verbose output
-q, --quietDo not print cargo log messages
-F, --featuresSpace or comma separated list of features to activate
--no-default-featuresNo default features
-p, --packagePackage to build
-h, --helpPrint 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).

Terminal
cargo mero --help
cargo mero <COMMAND> --help

Next Steps

After building your application with cargo mero build, you can:

  1. Install on a node: Use meroctl app install to deploy your built application
  2. Create contexts: Use meroctl context create to set up application networks
  3. Test locally: Use the development profile for faster iteration
  4. Deploy to production: Use the release profile for optimized builds
Was this page helpful?
Need some help? Check Support page