feat(build): BUILD_PROFILE=dev env var for fast local iteration#8
Merged
Conversation
…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>
This was referenced Jun 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add a
BUILD_PROFILE=dev(or=debug) env-var opt-in toci/build_wheel.pythat switches cargo + maturin off--release. Default stays release (CI / release wheels dominate this path). Mirrors fbuild'sFBUILD_BUILD_RELEASE=1pattern 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 onBUILD_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