Repository navigation
async: forward the mlkem feature to sunset - #68
Merged
Merged
Conversation
sunset-async depended on sunset with default features, so a no_std user of sunset-async could not disable mlkem: Cargo features only add up. The workspace entry for sunset now has default-features = false (a member inheriting with `workspace = true` cannot turn defaults off itself), and sunset-async gets its own `mlkem` feature, on by default. Nothing changes for existing users; other workspace members keep mlkem through `std` or through sunset-async's default. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
|
That looks reasonable, thanks. The 26kB stack size is a bit surprising, I would have expected perhaps 10kB. I'll keep an eye out next time I'm looking at that |
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.
sunsetgates ML-KEM behind itsmlkemfeature, butsunset-asyncdepends onsunsetwith default features, so ano_stduser ofsunset-asynccannot turn it off: Cargo features only add up.This PR forwards the feature:
sunsetgetsdefault-features = false(a member inheriting withworkspace = truecannot turn defaults off itself);sunset-asyncgetsmlkem = ["sunset/mlkem"], on by default.Nothing changes for existing users. The other workspace members keep
mlkemthroughstd(demo/common, demo/std, demo/sftp/std, stdasync, fuzz viaarbitrary) or throughsunset-async's default (sftp, demo/picow). A constrained target can now usesunset-async = { version = "0.6", default-features = false }and keepcurve25519-sha256.Why it matters: on a Cortex-M7 (STM32H743, release,
sunset-async0.6.0) the ML-KEM-768 key exchange is the deepest stack path of the SSH task:.text.rodata(the "without" build patched
sunset-asynctodefault-features = false; stack is a static estimate from the disassembly, following direct calls from the task'spoll.) On small MCUs those 26 kB decide whether SSH fits at all.Checked:
cargo check -p sunset-asyncwith and without default features,cargo tree -p sunset-async --no-default-featureshas noml-kem,cargo check -p sunset-sftp.🤖 Generated with Claude Code