Repository navigation
Closed
Labels
enhancementNew feature or request
Description
Adopt fbuild's perf + Windows-correctness lessons
FastLED/fbuild is a hybrid Rust+Python tool that has spent the past month grinding down ~50× of cumulative wall-clock cost on its install + iteration loop, and just landed a Windows stdout-ordering fix that is exactly the same bug this template will hit. Time to back-port the lessons.
This is a meta-issue — each box below was a self-contained PR. All merged; closing.
Source PRs in fbuild (for reference)
- FastLED/fbuild#747 — Ship native binary as raw wheel script; drop the Python shim.
- FastLED/fbuild#744 — Default to dev profile +
rust-lldlinker. - FastLED/fbuild#743 — mtime-skip in
setup.py+ pinnedCARGO_TARGET_DIR. - FastLED/fbuild#661 —
[tool.uv] cache-keysso editable installs re-sync on Rust edits.
Punch list
Correctness
- (1) Drop the Python CLI subprocess shim; ship
template-clias a raw wheel script. → fix(install): ship template-cli as raw wheel script; drop Python shim #7
Build speed
- (2)
[profile.dev.package."*"] opt-level = 3in the rootCargo.toml. → perf(build): rust-lld linker on Windows + opt-3 deps in dev profile #3 - (3)
[target.{x86_64,aarch64}-pc-windows-msvc] linker = "rust-lld.exe"in.cargo/config.toml. → perf(build): rust-lld linker on Windows + opt-3 deps in dev profile #3 - (4) Pin
CARGO_TARGET_DIRto a home-dir path for wheel builds. → perf(install): pin CARGO_TARGET_DIR + disable PEP 517 isolation #5 - (5)
[tool.uv] no-build-isolation-package = ["template-python-rust-cmd"]inpyproject.toml. Reverted in fix(install): ship template-cli as raw wheel script; drop Python shim #7 — with maturin the no-isolation trade-off doesn't work cleanly (uv reuses a build env without maturin; previewextra-build-dependenciesis fragile). Documented this in the resulting comment block; CARGO_TARGET_DIR pin from perf(install): pin CARGO_TARGET_DIR + disable PEP 517 isolation #5 still applies and gives most of the win. Marking complete because the question is settled. - (6) mtime-skip fast path in
ci/build_wheel.py. → perf(install): mtime-skip fast path + structured artifact discovery #6 - (7)
[tool.uv] cache-keyscovering Rust source. → fix(uv): re-sync editable on Rust edits via cache-keys #4 - (8) Profile-aware artifact discovery fallback in
ci/build_wheel.py. → perf(install): mtime-skip fast path + structured artifact discovery #6
Followups
- (9)
BUILD_PROFILE=devenv-var iteration path throughci/build_wheel.py. → feat(build): BUILD_PROFILE=dev env var for fast local iteration #8 - (10) Drop the Python CLI shim entirely (
cli.pydeleted,[project.scripts]removed). → bundled into fix(install): ship template-cli as raw wheel script; drop Python shim #7
Acceptance — all verified
- ✅
cmd /c 'echo === BEFORE === & template-cli --version & echo === AFTER ==='prints=== AFTER ===after the output (verified locally on Windows afteruv pip install dist/...whlinto a fresh venv). - ✅
unzip -l dist/template_python_rust_cmd-*.whlshowstemplate_python_rust_cmd-0.1.0.data/scripts/template-cli.exe. No_bin/entries. - ✅
file $(which template-cli)reportsPE32+ executable for MS Windows ... (console), x86-64. Not a Zip-archive console-script stub.
PRs merged in order
| # | PR | Items |
|---|---|---|
| 1 | #3 | (2) + (3) — dev profile + rust-lld |
| 2 | #4 | (7) — uv cache-keys |
| 3 | #5 | (4) + (5) — CARGO_TARGET_DIR + no-build-isolation |
| 4 | #6 | (6) + (8) — mtime-skip + JSON artifact discovery |
| 5 | #7 | (1) + (10) — raw wheel script, drop Python shim |
| 6 | #8 | (9) — BUILD_PROFILE=dev |
Metadata
Metadata
Assignees
Labels
enhancementNew feature or request
Activity
perf(build): rust-lld linker on Windows + opt-3 deps in dev profile (#2…
fix(uv): re-sync editable on Rust edits via cache-keys (#2 item 7) (#4)
perf(install): pin CARGO_TARGET_DIR + disable PEP 517 isolation (#2 i…
perf(install): mtime-skip fast path + structured artifact discovery (#2…
fix(install): ship template-cli as raw wheel script; drop Python shim (…
feat(build): BUILD_PROFILE=dev env var for fast local iteration (#2 i…