colcon-cargo
An extension for colcon-core to support Rust projects built with Cargo.
Install
$ pip3 install --user --upgrade git+https://github.com/colcon/colcon-cargo.git
Usage / Minimal example
Build a sample workspace
$ mkdir ws/
$ cd ws/
$ cargo init hello_world
$ cargo init hello_world2
$ tree .
.
├── hello-world
│ ├── Cargo.toml
│ └── src
│ └── main.rs
└── hello-world2
├── Cargo.toml
└── src
└── main.rs
4 directories, 4 files
Verify that cargo detects the Rust packages:
$ colcon list
hello-world hello-world (cargo)
hello-world2 hello-world2 (cargo)
Build them with Cargo:
$ colcon build
Starting >>> hello_world
Starting >>> hello_world_2
Finished <<< hello_world_2 [1.84s]
Finished <<< hello_world [1.94s]
Summary: 2 packages finished [2.34s]
Source the generated install/ directory and execute:
$ source install/setup.bash
$ hello-world
Hello, world!
$ hello-world2
Hello, world!
Testing
Test the packages with cargo:
$ colcon test
Starting >>> hello_world_2
Starting >>> hello_world
Finished <<< hello_world [0.24s]
Finished <<< hello_world_2 [0.25s]
Summary: 2 packages finished [0.39s]
Inspect the test results (cargo test and cargo fmt --check).
They should all succeed for the empty templates:
$ colcon test-result --all
build/hello_world_2/cargo_test.xml: 2 tests, 0 errors, 0 failures, 0 skipped
build/hello_world/cargo_test.xml: 2 tests, 0 errors, 0 failures, 0 skipped
Summary: 4 tests, 0 errors, 0 failures, 0 skipped
Metadata
Release files for colcon-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_cargo-0.2.0.tar.gz | 18.7 kB | Without provenance | Details for colcon_cargo-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| colcon_cargo-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for colcon_cargo-0.2.0-py3-none-any.whl |
Total release size: 37.2 kB
Release files / colcon_cargo-0.2.0.tar.gz
| Download URL | colcon_cargo-0.2.0.tar.gz |
|---|---|
| Size | 18.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
13ae86e397aa074d39e8fad2dd5e3e4297ccbd81d57b7137bd082d1646fc78a0
|
|
BLAKE2b-256 checksum How to use checksums |
77d9ce36a051964f0a85694448f5e62430d20f6412145830f8ed2de229f4f5c2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/59.8.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10
|
Release files / colcon_cargo-0.2.0-py3-none-any.whl
| Download URL | colcon_cargo-0.2.0-py3-none-any.whl |
|---|---|
| Size | 18.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0647c438feccd4d304e68799207eba9f671aede438ae803ec0f82e8e0120bce7
|
|
BLAKE2b-256 checksum How to use checksums |
aecce32fcd759b8d8a0dae25a0b69ce634d59fce9f084aa51e67ac4f048f4489
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/59.8.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10
|
Security for colcon-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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.