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.
Metadata
Release files for colcon-ros-cargo 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| colcon_ros_cargo-0.2.0.tar.gz | 9.8 kB | With provenance | Details for colcon_ros_cargo-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| colcon_ros_cargo-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for colcon_ros_cargo-0.2.0-py3-none-any.whl |
Total release size: 17.9 kB
Release files / colcon_ros_cargo-0.2.0.tar.gz
| Download URL | colcon_ros_cargo-0.2.0.tar.gz |
|---|---|
| Size | 9.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ef4b5a08c2513d2ab608fbcee5aaae76c73c44dd25d7de2f2db4f55195977d4f
|
|
BLAKE2b-256 checksum How to use checksums |
48a60c083c097d6d5e875fd8c8233303f33e16307e6e04dad38db238a2a51818
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 28, 2024.
Transparency logRelease files / colcon_ros_cargo-0.2.0-py3-none-any.whl
| Download URL | colcon_ros_cargo-0.2.0-py3-none-any.whl |
|---|---|
| Size | 8.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6faf41fcda00c328a7606fd91e0fdb47065a68c896743fed282b7eff866081ea
|
|
BLAKE2b-256 checksum How to use checksums |
d013ff61c421eb72c74e82d5c3c9927e96434479f2ce6bea086332966a017dcb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 28, 2024.
Transparency logSecurity for colcon-ros-cargo 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for colcon_ros_cargo-0.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 28, 2024.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.