Skip to content

Run Rust make targets across the whole workspace - #225

Merged
timkpaine merged 1 commit into
mainfrom
tkp/rust-workspace-make-targets
Nov 20, 2026
Merged

timkpaine merged 1 commit into
mainfrom
tkp/rust-workspace-make-targets

Conversation

@timkpaine

Copy link
Copy Markdown
Member

With add_c_abi, the rust template's rust/Cargo.toml is a workspace whose root package is the core crate. Cargo defaults to that root package, so make lint, make test, make coverage, make check, and make build in rust/ skipped the capi crate: clippy never linted it and its tests never ran.

This adds --workspace to those cargo commands in python/rust/rust/Makefile.jinja. Projects generated without the C ABI have a single package, so their builds are unchanged.

With add_c_abi, rust/ is a workspace whose root package is the core crate.
Cargo then defaults to that package alone, so make lint, test, check, and
build never touched the capi crate. Pass --workspace so clippy and the tests
cover it too; a project without the C ABI has a single package and builds
the same as before.

Signed-off-by: Tim Paine <3105306+timkpaine@users.noreply.github.com>
@timkpaine timkpaine added part: build PRs or issues related to the build lang: rust PRs or issues related to Rust type: bug Concrete, reproducible bugs tag: automerge Automatically merge this PR when status checks pass labels Nov 20, 2026
@timkpaine
timkpaine merged commit 7a6513e into main Nov 20, 2026
52 of 54 checks passed
@timkpaine
timkpaine deleted the tkp/rust-workspace-make-targets branch November 20, 2026 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lang: rust PRs or issues related to Rust part: build PRs or issues related to the build tag: automerge Automatically merge this PR when status checks pass type: bug Concrete, reproducible bugs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant