Installation
Command Line Interface
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.
From source
Currently it can only be installed from source, using Cargo:
cargo install --git https://github.com/dnaka91/mabo.git mabo-cli
TIP
If the installation fails, it can be that your Rust installation is too old. Please ensure you have the latest stable release installed. The easiest way to manage Rust is through Rustup.
Rust
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:
cargo add --git https://github.com/dnaka91/mabo.git mabo
cargo add --git https://github.com/dnaka91/mabo.git --build mabo-build
2
Or specify them in your Cargo.toml manually:
[dependencies]
mabo = { git = "https://github.com/dnaka91/mabo.git" }
[build-dependencies]
mabo-build = { git = "https://github.com/dnaka91/mabo.git" }
2
3
4
5