Skip to content

use SETUPTOOLS_RUST_CARGO_PROFILE=dev for main matrix, document it #527

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true

# Setting a fixed target dir ensures that all builds of examples re-use the same common dependencies
env:
CARGO_TARGET_DIR: ${{ github.workspace }}/target

jobs:
ruff:
runs-on: "ubuntu-latest"
Expand Down Expand Up @@ -110,6 +114,8 @@ jobs:
rust-target: "aarch64-apple-darwin",
}

env:
SETUPTOOLS_RUST_CARGO_PROFILE: dev
steps:
- uses: actions/checkout@v4

Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,12 @@ python
# ... better write some tests with pytest ...
```

## Environment variables for configuration

As well as all [environment variables supported by Cargo](https://doc.rust-lang.org/cargo/reference/environment-variables.html#environment-variables-cargo-reads), `setuptools-rust` also supports the following:

- `SETUPTOOLS_RUST_CARGO_PROFILE`: used to override the profile of the Rust build. Defaults to `release`, e.g. set to `dev` to do a debug build.

## Next steps and final remarks

- When you are ready to distribute your project, have a look on
Expand Down
Loading