Skip to content

maliput/maliput-rs

Repository files navigation

maliput-rs

Provides a Rust API for maliput.

Packages

  • crates.io -> maliput-sdk: Brings binaries of maliput ecosystem to cargo workspace.
  • crates.io -> maliput-sys: Provides ffi Rust bindings for the maliput API.
  • crates.io -> maliput : Provides a Rustacean API for maliput on top of maliput-sys.

Prerequisites

  • OS: Ubuntu 20.04
  • Bazel

Developer Guidelines

  1. A devcontainer is provided to easy setup the workspace. Refer to .devcontainer

  2. pre-commit is configured at this repository. Execute pre-commit locally before creating a pull request.

    pre-commit run --all-files
    

    Note: For installing pre-commit tool: pip3 install pre-commit

  3. A hook will automatically added to run pre-commit every time a git commit call is made. In order to skip this behavior you can PRE_COMMIT_ALLOW_NO_CONFIG=1 git commit.

Cargo build

Build the workspace

cargo build

Usage

Rely on each package's readme for understanding their issue.

Releasing process over crates.io

The releasing process is done by following the suggestions at https://doc.rust-lang.org/cargo/reference/publishing.html

Each package in the workspace is published separately.

Steps:

  • Identify which package is wanted to be released.
  • Bumps Cargo.toml's version value.
    • Keep in mind the SemVer rules which provide guidelines on what is a compatible change.
    • Keep in mind packages like maliput-sdk which also keeps a version for the bazel module.
  • Run cargo publish in dry-run mode to verify its packaging.
    • cargo publish -p <package> --dry-run
  • Manually publish the crate.
    • cargo publish -p <package>
    • In order to push you need to be whitelisted. Check the owners of the packages in crates.io to ask for permissions.