Extension for colcon to support cargo packages.
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file colcon_cargo-0.2.0.tar.gz.
File metadata
- Download URL: colcon_cargo-0.2.0.tar.gz
- Upload date:
- Size: 18.7 kB
- Tags: Source
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
13ae86e397aa074d39e8fad2dd5e3e4297ccbd81d57b7137bd082d1646fc78a0
|
|
| MD5 |
9173323a7ec60c0e47f2c8977d966913
|
|
| BLAKE2b-256 |
77d9ce36a051964f0a85694448f5e62430d20f6412145830f8ed2de229f4f5c2
|
File details
Details for the file colcon_cargo-0.2.0-py3-none-any.whl.
File metadata
- Download URL: colcon_cargo-0.2.0-py3-none-any.whl
- Upload date:
- Size: 18.6 kB
- Tags: Python 3
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0647c438feccd4d304e68799207eba9f671aede438ae803ec0f82e8e0120bce7
|
|
| MD5 |
e31b24764d471876467bd90584206750
|
|
| BLAKE2b-256 |
aecce32fcd759b8d8a0dae25a0b69ce634d59fce9f084aa51e67ac4f048f4489
|