Repository navigation
Build: plxnative-storage is its own workspace package - #333
Merged
Merged
Conversation
The storage helper was a [[bin]] of the app package, so cargo built the whole ~423k-line application library for a binary that links none of it: two host library builds in `make check` (`cargo test --bin plxnative-storage`, ci/test_storage_service_package.py) and a third, ARM one, in the `pkg/plxnative-storage` rule. rust-modules/ is now a cargo workspace. The root package `plxnative-modules` is unchanged and keeps its literal `version` (bump-version, check-package, source_bundle and the release tooling read it); `plxnative-storage` is a member at rust-modules/storage/ (src/main.rs = the old src/bin/plxnative-storage.rs, `#[path]`-including the same src/storage_service/*.rs and src/storage/state.rs as before) and does not depend on the app crate. One Cargo.lock, one .cargo/config.toml, same target dirs, every cargo invocation keeps its cwd. - Install-identity generation moved out of build.rs into build_support/install_identities.rs, called by both build scripts: one generator, no copy. - `[lints.rust] warnings = "deny"` is `[workspace.lints.rust]`, inherited by both packages. - Makefile: the storage rule is `cargo rustc -p plxnative-storage --bin plxnative-storage ...` with the same target dir, flags and env, and depends on the helper's own inputs; `make check` runs `cargo test -p plxnative-storage`; `make lint` passes --workspace. - ci/test_storage_package_isolated.py (new, in make check) runs both storage invocations and fails on any compiler-artifact record for plxnative_modules. RED on the unmodified tree (3 failures: the bin is owned by plxnative-modules, and both the test build and the rustc build compiled plxnative_modules), GREEN after. The ARM-shaped invocation is checked host-side in dev profile: a 32-bit build-std build is too heavy for a unit gate and the property is decided by the package graph. - ci/test_no_host_staticlib.py probed the lib through the storage bin; it now uses `cargo build --lib` and keeps its red-on-staticlib property. check-staticlib-artifact.py needed no change (the root lib keeps its name). - Comments this made false were corrected (Cargo.toml, Makefile, state.rs, app/mod.rs, gfx.rs, release-config-check.py). Measured: - Shipped dependency features unchanged: the ARM units' fingerprints and `cargo tree -e features` for the target are identical to the old layout; only host build-dep units differ (they are not shipped). - pkg/plxnative-storage (ARM, --no-default-features): 1630408 -> 1630212 bytes, not byte-identical. DT_NEEDED (8), the 109 dynamic symbols, and the normalized `nm` lists (3535 symbols, hashes, v0 Cs..._ disambiguators, .llvm.N and anon.* ids stripped) are identical; section sizes differ by 64 bytes of .rodata, which is the panic-location source paths (`src/bin/../storage_service/x.rs` -> `storage/src/../../src/storage_service/x.rs`). fwcompat matrix identical and OK on every release. - Fresh storage target dir: 562 MB -> 257 MB; the ARM storage build compiles 0 copies of plxnative-modules (was 1). In `make check` the storage steps compile 0 (was 2 host compiles). Open: on-device run of pkg/plxnative-storage has not been done. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01PUkd69QzFciCfQucbfiyKv
GLinnik21
force-pushed
the
lane/storage-own-package
branch
from
September 30, 2026 21:44
a6d310e to
2296223
Compare
This was referenced Sep 30, 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.
Closes #321
What changed
rust-modules/is now a cargo workspace. The root packageplxnative-modulesis untouched and keeps its literalversion;plxnative-storageis a member package atrust-modules/storage/that does not depend on the app crate (it#[path]-includes the samesrc/storage_service/*.rsandsrc/storage/state.rsas before). As a[[bin]]of the app package it made cargo build the whole application library for a binary that uses none of it.Cargo.lock, one.cargo/config.toml, same target dirs, every cargo invocation keeps its cwd (rust-modules/).build.rstobuild_support/install_identities.rs, called by both build scripts (no copy).[workspace.lints.rust] warnings = "deny", inherited by both packages.pkg/plxnative-storageiscargo rustc -p plxnative-storage --bin plxnative-storage ..., same target dir/flags/env, artifact path unchanged, depends only on the helper's own inputs;make checkrunscargo test -p plxnative-storage;make lintpasses--workspace.ci/test_no_host_staticlib.pyprobes withcargo build --libinstead of the storage bin (still red on astaticlibcrate type);ci/check-staticlib-artifact.pyneeded no change.Red, then green
New
ci/test_storage_package_isolated.py(wired intomake check) runs both storage invocations and fails on anycompiler-artifactrecord forplxnative_modules(fresh counts). The ARM-shapedcargo rustcinvocation is checked host-side in dev profile: a 32-bit build-std build is too heavy for a unit gate, and the property is decided by the package graph.Unmodified tree:
FAILED (failures=3)(bin owned byplxnative-modules;cargo testbuild compiledplxnative_modules(fresh: False);cargo rustcbuild compiledplxnative_modules(fresh: False)). After:Ran 6 tests ... OK.Feature tree
No drift for shipped dependencies:
cargo tree -e featuresfor the ARM target and the ARM-unit fingerprints (featuresper unit) match the old layout exactly; the app package's tree is identical to the old one. The only fingerprint differences are the new storage package's own units and host build-dependency units (not shipped).ELF
pkg/plxnative-storage: 1630408 -> 1630212 bytes, not byte-identical.DT_NEEDED(8) and the 109 dynamic symbols are identical; the normalizednmlist (3535 symbols;::h<hash>, v0Cs..._,.llvm.N,anon.<hash>.Nstripped) is identical. Differences:.rodata+64 bytes, all panic-location source paths (src/bin/../storage_service/x.rsbecamestorage/src/../../src/storage_service/x.rs), plus crate-disambiguator/CGU/build-id hashes. fw-compat review: PASS (identical fwcompat matrix, FLAGS_1, versions, CP15 scan).Sizes and compiles
Compiling plxnative-modules1 -> 0.make checkstorage steps: 2 host compiles of the app lib -> 0 (the library is built once directly by the staticlib probe).Gates (committed tree)
cargo +nightly check --lib --no-default-featuresandcheck -p plxnative-storage --no-default-features(cwd rust-modules): OK.make check: exit 0 (test result: ok. 5257 passed,ok. 5331 passed,ok. 102 passedfor the helper).makeandRELEASE=1 make: exit 0.Not yet verified: on-device run of pkg/plxnative-storage (manager runs it under the TV lock).
🤖 Generated with Claude Code
https://claude.ai/code/session_01PUkd69QzFciCfQucbfiyKv