Giter VIP home page Giter VIP logo

colcon-ros-cargo's Introduction

colcon-ros-cargo

Build cargo projects with colcon.

Usage

Packages need to have a package.xml in addition to Cargo.toml. You should see such packages classified as ament_cargo in the output of colcon list. If they are classified as ros.ament_cargo instead, the colcon-ros-cargo extension has not been found by colcon. Make sure that you have built and loaded (source install/setup.bash) the extension.

Simply list dependencies (other ament_cargo packages or message packages) in Cargo.toml and package.xml as if they were hosted on crates.io. colcon-ros-cargo will find the dependencies and create a .cargo/config.toml file that helps cargo find these packages.

Extra arguments to cargo can be passed via the --cargo-args option, e.g. colcon build --cargo-args --release.

After building, run binaries with ros2 run.

colcon-ros-cargo also aims to support using cargo directly as the primary build tool. Just build with colcon once, to make sure all non-Cargo dependencies are built and the .cargo/config.toml file exists, and then using cargo will just work โ€“ cargo build, cargo clippy, cargo doc, etc. When the dependency graph changes, rebuild with colcon.

Limitations

This is by far not a perfect build system.

Notably, there is quadratic build cost as a function of the dependency chain length. To illustrate this, assume there are packages A, B and C, where C depends on B and B depends on A. If colcon builds this workspace, it builds A first, then B, then C. However, Cargo will also build all the dependencies, i.e., to build B, Cargo will build A again, and to build C, it will build A and B again.

colcon test is not yet supported.

colcon-ros-cargo's People

Contributors

nnmm avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.