Skip to content

Support no_std builds - #85

Draft
dharjeezy wants to merge 1 commit into
sigp:mainfrom
polytope-labs:no-std-and-progressive-list
Draft

dharjeezy wants to merge 1 commit into
sigp:mainfrom
polytope-labs:no-std-and-progressive-list

Conversation

@dharjeezy

@dharjeezy dharjeezy commented Sep 10, 2026 •

Copy link
Copy Markdown

Draft: blocked on ethereum_hashing#23, ethereum_serde_utils#21, ethereum_ssz#86 and tree_hash#53. CI here will fail dependency resolution until those are merged and released. Part of a series adding no_std support across the SSZ stack so it can be used from a Substrate runtime.

What this does

Adds no_std support. Nothing else.

This originally also added a ProgressiveList. That is dropped: #84 already covers EIP-7916 and is further along, so there is no sense in a competing type. This PR is now just the no_std work, as requested.

Why

Substrate runtimes compile to wasm32-unknown-unknown without std. The containers here need only core and alloc.

Changes

  • #![cfg_attr(not(feature = "std"), no_std)] with extern crate alloc
  • std imports replaced with alloc equivalents
  • the std feature wires through to the dependencies that need it

The std build is unchanged.

Why it cannot build yet

It depends on no_std versions of tree_hash, ethereum_ssz and ethereum_serde_utils, proposed in the PRs above and not yet released.

Verification

Verified locally against the proposed branches via path patches.

Check Result
cargo test 67 + 3 passed
cargo check --no-default-features --features sha2 --target wasm32-unknown-unknown clean
cargo fmt --check no diffs

The branch name is left as it was so the existing review thread is preserved, and no longer describes the contents.

@michaelsproul

Copy link
Copy Markdown
Member

there is another PR already under review for progressive list, if you'd like to do no_std please do just that in this PR

@dharjeezy dharjeezy changed the title Add ProgressiveList and support no_std builds Support no_std builds Sep 10, 2026
@dharjeezy
dharjeezy force-pushed the no-std-and-progressive-list branch from 88e4a54 to cfb1ffa Compare September 10, 2026 13:54
@dharjeezy

dharjeezy commented Sep 10, 2026 •

Copy link
Copy Markdown
Author

Thanks, dropped it. This is now just the no_std change, and I have rebased so #84 stands on its own for EIP-7916.

@dharjeezy
dharjeezy force-pushed the no-std-and-progressive-list branch from cfb1ffa to 3a874ec Compare September 11, 2026 09:27
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.

2 participants