Skip to content

An extension for colcon-core to support Rust projects built with Cargo

License

Notifications You must be signed in to change notification settings

colcon/colcon-cargo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

colcon-cargo

CI

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!

About

An extension for colcon-core to support Rust projects built with Cargo

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published