Skip to content

no_std support, infallible get/set/mask field operations #4

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

rcgoodfellow
Copy link
Collaborator

@rcgoodfellow rcgoodfellow commented Aug 1, 2025

This PR.

  • Adds no_std support.
  • Makes the mask operation infallible which bubbles up to get_field and set_field.

@rcgoodfellow rcgoodfellow changed the title no_std support no_std support, infallible get/set/mask field operations Aug 5, 2025
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds no_std support to the library and makes field operations infallible by removing error handling from the mask, get_field, and set_field methods.

  • Enables no_std support by replacing std imports with core and adding extern crate alloc
  • Makes mask, get_field, and set_field operations infallible by removing Result return types
  • Updates all call sites to use the new infallible APIs

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
lib/src/lib.rs Adds no_std support, converts field operations to infallible APIs, and includes mathematical proof for index safety
README.md Updates code examples to reflect the new infallible API usage

@rcgoodfellow rcgoodfellow marked this pull request as ready for review August 5, 2025 16:26
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.

1 participant