Roadmap & status#
This page captures Pigweed’s dependency implementation status and roadmap (current as of November 19, 2026) for its dependency architecture.
Note
Full hermetic dependency management targets Bazel, Pigweed’s primary build system. GN and CMake builds continue to use pw_env_setup, pw_package, and project-managed source checkouts.
Current status#
Several core components of the architecture are already in production in Pigweed:
Rust (crates.io):
@rust_cratesindirection via pw_build/pw_rust_crates_extension.bzl withstd/no_stdplatform constraint selection,override_reposupport, SHA-256Cargo.lockchecksums, andcargo denylicense and advisory checks in CI (see crates.io dependencies).Python (PyPI): Platform-specific, SHA-256 hash-pinned lockfiles, configurable
PIGWEED_PIP_INDEX_URLindex redirection, and hermetic localsdistbuilds using--no-indexand--no-build-isolation.Prebuilt binaries and toolchains (CIPD):
cipd,pw_cxx_toolchain, andpw_rustextensions supporting root-module toolchain tag overrides,dev_dependency = Truetoolchain registrations,override_repoescape hatches, and 6 dev-onlycipd_dev_extrepositories.Bzlmod hygiene: Initial
dev_dependency = Truemodule declarations (rules_doxygen,rules_mypy) and non-root consumer CI testing (pw_build/bazel_tests/non_root_test).
Current limitations#
Unconditional crate.from_cargo and pip.parse evaluation: Pigweed’s top-level MODULE.bazel still invokes
crate(crate.from_cargoforcrates_stdandcrates_no_std) andpip(pip.parseforpigweed_python_packages) in its non-dev module configuration. If a downstream or offline project uses@rules_rust’scrateor@rules_python’spipextension, Bazel evaluates Pigweed’s default manifests even when the resulting hub repository is overridden.Non-propagating module patches: Required portability and security patches in MODULE.bazel currently rely on root-only
single_version_overridedeclarations, which Bazel ignores when@pigweedis consumed as a dependency. Downstream roots must duplicate those patches manually.Direct BCR resolution and remaining dev-dependency bloat: Pigweed still resolves Bazel modules directly against
bcr.bazel.build, and a number of upstream-only build rules, Python packages, crates, and CIPD tools have not yet been isolated behinddev_dependency = True.
Roadmap#
Pigweed is completing the dependency architecture in two milestones:
Split MODULE.bazel into Core, Resolution, and Dev Module Files and prune dev dependencies: Expose
@rust_crates(with stubcrates_stdandcrates_no_stdhubs onpw_rust_crates) and@pigweed_python_packages(via apw_py_packageswrapper extension) in the Core Module File. Isolate Pigweed’s defaultcrateandpipextensions underuse_extension(..., dev_dependency = True)in the Resolution Module File (bazel/resolve.MODULE.bazel) wired withoverride_reposo downstream projects skip upstream manifest evaluation, use@rules_rustcrateor@rules_pythonpipindependently, or bind their own hubs uniformly withoverride_repo. Also exportCargo.tomlandCargo.lockfromthird_party/crates_io/crates_{std,no_std}/BUILD.bazel(matching the already-exported Python lockfiles in pw_env_setup/py/BUILD.bazel), migratepipindex configuration topip.default(index_url = ...)withenvsubstretained onpip.parse, and move upstream-only dependencies into the Dev Module File (bazel/dev.MODULE.bazel):Bzlmod: Move 14 upstream-only modules to the Dev Module File, reducing Core Module File
bazel_depentries from 38 to 24 (41 total), and expand non-root CI leak checks.crates.io: Split upstream-only test, CLI, and board-example crates out of
crates_std(32 crates) andcrates_no_std(13 crates) intocrates_std_devandcrates_no_std_devinside the Dev Module File.PyPI: Split documentation, lint, and test packages out of the main lockfile, reducing locked consumer Python packages from 130 to 56.
CIPD: Move 4 remaining upstream-only formatter, GN, and emulator repositories (
qemu,buildifier,gn,go) fromcipd_exttocipd_dev_ext(keepingbloatyincipd_extbecause public pw_bloat/py/BUILD.bazel depends on it), standardize SHA-256 instance digests with SLSA provenance, and align multi-tier root-wins tag precedence across CIPD and toolchain extensions.
Launch the Pigweed Bazel Registry and static archive mirror: Stand up the Git-reviewed PBR repository and automated CI publishing pipeline to immutable static storage (stripping root-only
include()lines when publishing@pigweeditself to PBR), migratesingle_version_overridepatches and third-partyBUILD.bazeloverlays into PBRsource.jsonmetadata, and switch Pigweed’s.bazelrcto resolve exclusively from PBR withbcr.bazel.builddisabled.