{"id":28206415,"url":"https://github.com/colcon/colcon-cargo","last_synced_at":"2025-06-11T21:31:36.900Z","repository":{"id":41658627,"uuid":"141328521","full_name":"colcon/colcon-cargo","owner":"colcon","description":"An extension for colcon-core to support Rust projects built with Cargo","archived":false,"fork":false,"pushed_at":"2025-03-14T22:25:05.000Z","size":91,"stargazers_count":36,"open_issues_count":13,"forks_count":21,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-05-17T10:09:46.742Z","etag":null,"topics":["cargo","colcon"],"latest_commit_sha":null,"homepage":"http://colcon.readthedocs.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/colcon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-07-17T18:30:34.000Z","updated_at":"2025-03-18T07:23:38.000Z","dependencies_parsed_at":"2024-04-12T08:41:16.586Z","dependency_job_id":"d1f9b776-d29e-4c5d-ba94-5b448960902c","html_url":"https://github.com/colcon/colcon-cargo","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/colcon/colcon-cargo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/colcon%2Fcolcon-cargo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/colcon%2Fcolcon-cargo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/colcon%2Fcolcon-cargo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/colcon%2Fcolcon-cargo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/colcon","download_url":"https://codeload.github.com/colcon/colcon-cargo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/colcon%2Fcolcon-cargo/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259345627,"owners_count":22843567,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cargo","colcon"],"created_at":"2025-05-17T10:09:47.239Z","updated_at":"2025-06-11T21:31:36.895Z","avatar_url":"https://github.com/colcon.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# colcon-cargo\n\n[![CI](https://github.com/colcon/colcon-cargo/actions/workflows/ci.yaml/badge.svg?branch=main\u0026event=push)](https://github.com/colcon/colcon-cargo/actions/workflows/ci.yaml?query=branch%3Amain+event%3Apush)\n\nAn extension for [colcon-core](https://github.com/colcon/colcon-core) to\nsupport Rust projects built with Cargo.\n\n## Install\n```sh\n$ pip3 install --user --upgrade git+https://github.com/colcon/colcon-cargo.git\n```\n\n## Usage / Minimal example\n\n\u003cdetails\u003e\n\u003csummary\u003eBuild a sample workspace\u003c/summary\u003e\n\u003cbr\u003e\n\n```sh\n$ mkdir ws/\n$ cd ws/\n$ cargo init hello_world\n$ cargo init hello_world2\n$ tree .\n\n.\n├── hello-world\n│   ├── Cargo.toml\n│   └── src\n│       └── main.rs\n└── hello-world2\n    ├── Cargo.toml\n    └── src\n        └── main.rs\n\n4 directories, 4 files\n\n```\n\n\u003c/details\u003e\n\nVerify that cargo detects the Rust packages:\n\n```sh\n$ colcon list\n\nhello-world     hello-world     (cargo)\nhello-world2    hello-world2    (cargo)\n```\n\nBuild them with Cargo:\n\n```sh\n$ colcon build\n\nStarting \u003e\u003e\u003e hello_world\nStarting \u003e\u003e\u003e hello_world_2\nFinished \u003c\u003c\u003c hello_world_2 [1.84s]\nFinished \u003c\u003c\u003c hello_world [1.94s]\n\nSummary: 2 packages finished [2.34s]\n```\n\nSource the generated `install/` directory and execute:\n\n```sh\n$ source install/setup.bash\n$ hello-world\n\nHello, world!\n\n$ hello-world2\n\nHello, world!\n```\n\n### Testing\n\nTest the packages with cargo:\n\n```sh\n$ colcon test\nStarting \u003e\u003e\u003e hello_world_2\nStarting \u003e\u003e\u003e hello_world\nFinished \u003c\u003c\u003c hello_world [0.24s]                                           \nFinished \u003c\u003c\u003c hello_world_2 [0.25s]\n\nSummary: 2 packages finished [0.39s]\n```\n\nInspect the test results (`cargo test` and `cargo fmt --check`).\nThey should all succeed for the empty templates:\n\n```sh\n$ colcon test-result --all\nbuild/hello_world_2/cargo_test.xml: 2 tests, 0 errors, 0 failures, 0 skipped\nbuild/hello_world/cargo_test.xml: 2 tests, 0 errors, 0 failures, 0 skipped\n\nSummary: 4 tests, 0 errors, 0 failures, 0 skipped\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcolcon%2Fcolcon-cargo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcolcon%2Fcolcon-cargo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcolcon%2Fcolcon-cargo/lists"}