ros_new

Crates.ioros_new
lib.rsros_new
version0.1.2
created_at2025-07-13 19:56:28.880502+00
updated_at2025-08-21 16:11:20.131212+00
descriptionCargo plugin to create new ROS2 Rust packages with package.xml
homepagehttps://gitlab.com/rust_projects3505446/ros_new
repositoryhttps://gitlab.com/rust_projects3505446/ros_new
max_upload_size
id1750753
size52,042
Guelakais (Guelakais)

documentation

README

License Crates.io Downloads Docs Crates.io

cargo-ros-new

A Cargo plugin for creating new Rust packages with ROS package.xml files.

Features

  • Creates a standard Rust package using cargo new with all its features
  • Generates a ROS-compatible package.xml file with:
    • Package name and version
    • Maintainer information (name and email)
    • License declaration
    • Description
    • Correct format specification
    • Ament build type declaration
  • Supports all cargo new options:
    • Binary or library template (--bin/--lib)
    • Edition specification (--edition)
    • VCS initialization (--vcs)

Installation

Install from crates.io:

cargo install cargo-ros-new

Usage

Basic usage

cargo ros-new my_package

This will create:

  • A new Rust package named my_package
  • A package.xml file with default values

With options

cargo ros-new my_package \
  --maintainer "John Doe" \
  --mail "john@example.com" \
  --license "MIT" \
  --description "My awesome ROS package" \
  --edition 2024 \
  --vcs git

As a Cargo subcommand

You can also use it as a regular Cargo subcommand:

cargo new --ros my_package

Configuration

The following default values are used if not specified:

  • Maintainer: "user"
  • Email: "you@email.com"
  • License: "TODO: License declaration"
  • Description: "TODO: Package description"
  • Format: "3" (ROS package format 3)

Building from source

With Nix

If you have Nix installed, you can build and enter a development environment with:

nix develop

Then build with:

cargo build

Without Nix

Standard Rust build process:

cargo build

License

Apache-2.0

Contributing

Contributions are welcome! Please open issues or merge requests on our GitLab repository.

ROS Compatibility

The generated packages are compatible with ROS 2 and the Ament build system through the ament_cargo build type.

Commit count: 11

cargo fmt