refactor(build): extract esp/arm/mcu platform crates for parallel compiles (#1008 A2)#1017
Conversation
…compiles (#1008 A2) Phase A2 of the compile-parallelism split. Move the 14 platform orchestrators out of the fbuild-build facade into three per-family crates that depend only on fbuild-build-engine and compile IN PARALLEL: fbuild-build-esp — esp32, esp8266 fbuild-build-arm — generic_arm, stm32, rp2040, apollo3, nxplpc, sam, nrf52, silabs, teensy, renesas fbuild-build-mcu — avr, ch32v Each platform crate does `pub use fbuild_build_engine::*` so its modules' `crate::<engine_mod>` / `crate::BuildParams` / `crate::PlatformSupport` paths resolve unchanged. Migrated the 8 `crate::esp32::mcu_config::DefineEntry` imports (in arm/mcu platforms) to the engine path `crate::mcu_config::DefineEntry` so the groups are self-contained (ENGINE→PLATFORM = 0, PLATFORM→PLATFORM only within a group). The facade re-exports all three crates (`pub use fbuild_build_esp::{…}` etc.) so every `fbuild_build::esp32::…` / `fbuild_build::teensy::…` path and the `get_platform_support()` factory keep resolving — consumers unchanged. Net effect: an edit to one platform (e.g. teensy) now recompiles only fbuild-build-arm + the ~90-LOC facade, not the whole 37.7K-LOC crate; the three platform crates rebuild concurrently. crate-gate: added the three crates to root members + both allowlists. Verified: `cargo check --workspace` green (cli/daemon unchanged); esp 16 + arm 195 + mcu 92 + facade 53 tests pass (356 total, matching pre-split); crate-gate OK (18 members); clippy -D warnings + fmt clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Important Review skippedToo many files! This PR contains 166 files, which is 16 over the limit of 150. To get a review, narrow the scope: Upgrade to a paid plan to raise the limit. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (166)
You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Part of #1008 — Phase A2. Move the 14 platform orchestrators out of the
fbuild-buildfacade into three per-family crates that depend only onfbuild-build-engineand compile in parallel:fbuild-build-esp— esp32, esp8266fbuild-build-arm— generic_arm, stm32, rp2040, apollo3, nxplpc, sam, nrf52, silabs, teensy, renesasfbuild-build-mcu— avr, ch32vEach platform crate does
pub use fbuild_build_engine::*so its modules'crate::<engine_mod>/crate::BuildParams/crate::PlatformSupportpaths resolve unchanged. Migrated the 8crate::esp32::mcu_config::DefineEntryimports in arm/mcu platforms to the engine path so the groups are self-contained. The facade re-exports all three (pub use fbuild_build_esp::{…}etc.) — everyfbuild_build::esp32::…/fbuild_build::teensy::…path andget_platform_support()keep resolving; consumers unchanged.Net effect: an edit to one platform (e.g. teensy) now recompiles only
fbuild-build-arm+ the ~90-LOC facade, not the whole 37.7K-LOC crate; the three platform crates rebuild concurrently.Verified — local + Linux Docker
cargo check --workspacegreen (cli/daemon unchanged) on Windows + Linux Docker (1m43s incremental).-D warnings+ fmt clean.🤖 Generated with Claude Code