-
Notifications
You must be signed in to change notification settings - Fork 2
sdk: make the IntentBody derive no_std #451
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| [package] | ||
| name = "no-std-probe" | ||
| version = "0.1.0" | ||
| edition.workspace = true | ||
| license.workspace = true | ||
| repository.workspace = true | ||
| description = "Compile-only #![no_std] probe: the IntentBody derive must expand without the consumer's std prelude." | ||
|
|
||
| [lib] | ||
| # Never shipped. Living in the workspace keeps the derive's no_std | ||
| # contract under the workspace check/clippy gate. | ||
|
|
||
| [lints] | ||
| workspace = true | ||
|
|
||
| [dependencies] | ||
| # Source of the `IntentBody` derive and trait the probe enum implements. | ||
| nexum-venue-sdk = { path = "../nexum-venue-sdk" } | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Relatedly: this direct dependency on
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Confirmed still valid at HEAD - the no-std-probe at the tip still only derives |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| //! Compile-only `#![no_std]` probe: `#[derive(IntentBody)]` must expand | ||
| //! without the consumer's std prelude or an `extern crate alloc`. | ||
|
|
||
| #![no_std] | ||
| #![warn(missing_docs)] | ||
|
|
||
| use nexum_venue_sdk::IntentBody; | ||
|
|
||
| /// The probe schema: one published version over a bare byte payload. | ||
| #[derive(IntentBody, Clone, Debug, PartialEq, Eq)] | ||
| pub enum ProbeBody { | ||
| /// First published version. | ||
| V1(u8), | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checked the actual owning crate of
IntentBody/BodyError/__private::alloc—nexum-venue-sdk'slib.rshas no#![no_std]attribute anywhere (confirmed at this PR's head commit); it's a regular std crate.cow-venuedepends on it unconditionally for thebodyfeature.#![no_std]oncow-venueonly governs this crate's own prelude/source, it doesn't make the dependency graph no_std-capable — building for a genuine bare-metal target (no std implementation at all, unlikewasm32-wasip2which the PR body itself notes is "std-bearing") would almost certainly fail atnexum-venue-sdk's own compilation step, beforecow-venueis even reached. The repo's only specialized target config (.cargo/config.toml) iswasm32-wasip2, and there's no CI job orjustrecipe building against an actual no-std-only target triple (e.g.thumbv7em-none-eabi) — so the stated goal ("blocked bare-metal consumers" → unblocked) is checked only bycargo checkon the default host target, where std is trivially available regardless of any#![no_std]attribute. Worth either convertingnexum-venue-sdkitself to#, or scoping the PR's claim down to "the derive no longer hardcodes::stdpaths" rather than "unblocks bare-metal consumers," since that part is unverified and likely not yet true.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confirmed still valid at HEAD.
videre-sdk(theIntentBodyowner post-rename) still carries no#![no_std]at the tip, and there is no CI/just build against a real no-std triple - onlywasm32-wasip2(std-bearing) and hostcargo check. The derive itself is clean; the bare-metal goal is unverified and, per the unconditionalvidere-sdkdependency, not yet reachable. Tracked in #521, with your scope-down alternative recorded there.