feat(store)!: port nexus-store to no_std (core+alloc) (#301)#307
Merged
Conversation
…deps, hakari-exclude nexus-store (#301) Also restores the exact former default feature sets in every other std consumer discovered by the workspace-wide grep (nexus-store-testing and the store-and-kernel/store-inmemory/projection-tokio/fjall-end-to-end examples), which the spec's known-consumer list did not enumerate but which needed the same treatment to keep cargo check --workspace green. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Summary
#![cfg_attr(not(feature = "std"), no_std)]+ unconditionalextern crate allocbehind an additive defaultstdfeature (mirrors [freeze][T1] no_std kernel: portnexusto core+alloc (public error bounds are freeze-relevant) — or drop the IoT claim #279 / feat(nexus)!: port kernel to no_std (core+alloc) (#279) #303; unlike the pure-core kernel, the store is alloc-dependent by design)std::error::Error→core::error::Error(stable since 1.81; a re-export, so no semantic change for std consumers — but irreversible post-1.0 in the other direction)futures/bytes/aligned-vecflip todefault-features = falseat the workspace root (workspace inheritance cannot overridedefault-features); every std consumer restores its exact former feature set locally — including five consumers beyond the issue's list found by the sweep, andnexus-fjall'sfuturesline which previously compiled only via workspace-hack feature unificationnexus-storejoins hakari[final-excludes]— workspace-hack force-enables std-implyingfutures-utilfeatures (io/channel/sink) that unification would otherwise leak into the no_std build, making the gate a silent no-opnexus-store-nostd: host--no-default-features(in-crate std-leak detector), wasm32, andthumbv7em-none-eabihf— the issue assumed a bare-metal build needs a#[global_allocator], but that holds only for binaries; an rlib links no allocator, so the store gets the same strong gate as the kernel. The thumb gate also builds the dep-free feature set (subscription,export,import,snapshot,projection), empirically proven no_std-clean (the whole catch-up→live-tail loop ridesfutures' alloc-only surface)json/rkyv/cbor) remain std-only by design —serde_json/rkyv/crc32cpull std today; follow-up card materialThe
!is earned by the workspace default-feature flips (affects--no-default-featuresconsumers of those deps), not by the bounds change.Closes #301
Test plan
nix flake checkgreen including the newnexus-store-nostdgate (pre-commit hook, both commits)cargo nextest run -p nexus-store— 544/544, std path unchangedcargo clippy --all-features --all-targets— zero warnings--no-default-featuresbuilds verified locally🤖 Generated with Claude Code