Skip to content

feat: make the formats and the std tiers separately selectable - #8

Merged
LNSD merged 1 commit into
mainfrom
lnsd/per-format-features
Aug 13, 2026
Merged

LNSD merged 1 commit into
mainfrom
lnsd/per-format-features

Conversation

@LNSD

@LNSD LNSD commented Aug 13, 2026 •

Copy link
Copy Markdown
Contributor

Reading one format meant compiling all eight and linking std, though the formats share no code and only two functions in the crate touch a filesystem; the surface a consumer pays for is now the surface it names.

  • Add one feature per format and an all-formats that turns on every one, gating each format's raw, read and write modules. The default is all-formats and std, so a consumer that names nothing keeps the whole crate.
  • Split the runtime into alloc and std: a builder needs a heap and nothing more, so write moves behind alloc and only the from_directory builders and the errors naming a path stay behind std.
  • Drop filesystem-support, which std now says; elf-parsing stays, since it is the only thing pulling object and its fifteen crates, and lz4-compression drops to alloc.
  • Tell every dependency which side of the core/std line a build is on, rather than leaving them all on the no_std side because that is what the bare-metal build needs.
  • Publish the read sub-modules and drop the aliased re-exports, so a name is read::nro::FromBytesError rather than read::NroFromBytesError, and read matches raw and write.

Breaking for nx-std/tools: one import, read::SetLanguage -> read::nacp::SetLanguage.

@LNSD LNSD self-assigned this Aug 13, 2026
@LNSD
LNSD force-pushed the lnsd/per-format-features branch from 76f5d97 to 706f504 Compare August 13, 2026 12:54
@LNSD LNSD changed the title feat: make each format separately selectable feat: make the formats and the std tiers separately selectable Aug 13, 2026
@LNSD
LNSD force-pushed the lnsd/per-format-features branch 2 times, most recently from 5b8948f to 63fcbbe Compare August 13, 2026 13:02
Reading one format meant compiling all eight and linking `std`, though the formats share no code and only two functions in the crate touch a filesystem; the surface a consumer pays for is now the surface it names.

- Add one feature per format and an `all-formats` that turns on every one, gating each format's `raw`, `read` and `write` modules. The default is `all-formats` and `std`, so a consumer that names nothing keeps the whole crate.
- Split the runtime into `alloc` and `std`: a builder needs a heap and nothing more, so `write` moves behind `alloc` and only the `from_directory` builders and the errors naming a path stay behind `std`.
- Drop `filesystem-support`, which `std` now says; `elf-parsing` stays, since it is the only thing pulling `object` and its fifteen crates, and `lz4-compression` drops to `alloc`.
- Tell every dependency which side of the `core`/`std` line a build is on, rather than leaving them all on the `no_std` side because that is what the bare-metal build needs.
- Publish the `read` sub-modules and drop the aliased re-exports, so a name is `read::nro::FromBytesError` rather than `read::NroFromBytesError`, and `read` matches `raw` and `write`.

Signed-off-by: Lorenzo Delgado <lnsdev@proton.me>
@LNSD
LNSD force-pushed the lnsd/per-format-features branch from 63fcbbe to e38860c Compare August 13, 2026 13:13
@LNSD
LNSD added this pull request to the merge queue Aug 13, 2026
Merged via the queue into main with commit d9b2c68 Aug 13, 2026
5 checks passed
@LNSD
LNSD deleted the lnsd/per-format-features branch August 13, 2026 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant