Skip to content

Conversation

@dannywillems
Copy link
Member

Summary

  • Add no-std and std features to o1-utils crate (std is default)
  • Add conditional #![no_std] attribute to lib.rs
  • Replace std:: imports with core:: equivalents where possible
  • Add conditional alloc crate imports for Vec and other types
  • Feature-gate std-only modules:
    • serialization (requires std::io::BufReader)
    • lazy_cache (requires std::sync::Once)
    • chunked_evaluations (depends on serialization)
    • tests (requires thread_rng)
  • Enable o1-utils in no-std CI workflow

Test plan

  • cargo check -p o1-utils --features no-std --no-default-features passes locally
  • CI no-std check passes

Closes: o1-labs/mina-rust#1988

- Add `no-std` and `std` features to Cargo.toml (std is default) - Add conditional `#![no_std]` attribute to lib.rs - Replace `std::` imports with `core::` equivalents where possible - Add conditional `alloc` crate imports for Vec and other types - Feature-gate std-only modules (serialization, lazy_cache, chunked_evaluations) - Enable o1-utils in no-std CI workflow Closes: o1-labs/mina-rust#1988
@dannywillems dannywillems self-assigned this Dec 19, 2025
@dannywillems dannywillems moved this to In Review in Rust node Dec 19, 2025
@dannywillems dannywillems linked an issue Dec 19, 2025 that may be closed by this pull request
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants