Skip to content

Installation

The CLI tool is not strictly needed to compile and use Mabo schemas, but it contains several helpful elements like a validator for schema correctness, a formatter and helper for setting up Mabo in your project.

Currently it can only be installed from source, using Cargo:

Terminal window
cargo install --git https://forge.dnaka91.rocks/dnaka91/mabo.git mabo-cli

For Rust projects, two crates are needed to work with Mabo schemas and data. One is the mabo crate for runtime support, which contains all components that are used by the generated code.

The other one is the mabo-build crate which generates the Rust code from schema files. It is used as Build Script usually in the build.rs file of your project.

You can use Cargo’s add command to add those dependencies:

Terminal window
cargo add --git https://forge.dnaka91.rocks/dnaka91/mabo.git mabo
cargo add --git https://forge.dnaka91.rocks/dnaka91/mabo.git --build mabo-build

Or specify them in your Cargo.toml manually:

[dependencies]
mabo = { git = "https://forge.dnaka91.rocks/dnaka91/mabo.git" }
[build-dependencies]
mabo-build = { git = "https://forge.dnaka91.rocks/dnaka91/mabo.git" }