Skip to content

feat(build): BUILD_PROFILE=dev env var for fast local iteration#8

Merged
zackees merged 1 commit into
mainfrom
feat/build-profile-dev-env-var
Jun 22, 2026
Merged

feat(build): BUILD_PROFILE=dev env var for fast local iteration#8
zackees merged 1 commit into
mainfrom
feat/build-profile-dev-env-var

Conversation

@zackees

@zackees zackees commented Jun 22, 2026

Copy link
Copy Markdown
Owner

Summary

Add a BUILD_PROFILE=dev (or =debug) env-var opt-in to ci/build_wheel.py that switches cargo + maturin off --release. Default stays release (CI / release wheels dominate this path). Mirrors fbuild's FBUILD_BUILD_RELEASE=1 pattern but inverted.

Combined with PR #3's [profile.dev.package."*"] opt-level = 3 + rust-lld linker, this is the biggest single unlock for the Rust-edit → wheel round trip in the local dev loop.

Test plan

  • _use_release_profile() returns True by default, False on BUILD_PROFILE=dev/DEV/debug/DEBUG.
  • _profile_subdir() follows.
  • build_cli_binary() cargo invocation conditionally inserts --release.
  • build_python_artifacts() maturin invocation conditionally inserts --release.

Refs #2 — item (9).

🤖 Generated with Claude Code

…tem 9)

Mirrors fbuild's FBUILD_BUILD_RELEASE=1 opt-in pattern but inverted:
release is the default (CI / release wheels are the dominant path
through ci/build_wheel.py and must ship optimized binaries), and
`BUILD_PROFILE=dev` (or `=debug`) opts into the dev profile for local
iteration.

Combined with the dev-profile knobs from PR #3 (`[profile.dev.package."*"]
opt-level = 3` + rust-lld linker), this is the biggest single unlock
for the Rust-edit → wheel round trip on the local dev loop.

What changes when BUILD_PROFILE=dev:
- cargo invocation drops `--release`
- maturin invocation drops `--release`
- cache-skip + filesystem-search probe `target/debug/` instead of
  `target/release/`

Refs #2 (item 9).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant