Skip to content

Integrate zerocopy - #42

Merged
frozenspider merged 8 commits into
mainfrom
f/zerocopy
Aug 4, 2026
Merged

Integrate zerocopy#42
frozenspider merged 8 commits into
mainfrom
f/zerocopy

Conversation

@frozenspider

@frozenspider frozenspider commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Derive zerocopy traits for sets (semirings, rings and fields).
Unfortunately, we can only meaningfully derive them for our own Boolean and F2 types, for the rest we only derive KnownLayout .

(As a future note, dynamic field elements shouldn't derive FromBytes as using it on invalid bit pattern might lead to soundness gaps)

While we're at it, also moved trivial forward implementation of Zeroize to derive approach

@frozenspider frozenspider changed the title F/zerocopy Integrate zerocopy Aug 3, 2026
@frozenspider
frozenspider marked this pull request as ready for review August 3, 2026 11:23
@frozenspider
frozenspider requested a review from zkfriendly August 3, 2026 11:23

@zkfriendly zkfriendly left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for the PR, had a minor point and comment:

The new tests are gated by feature = "zerocopy", but the build-and-test workflow runs only the default feature set, where zerocopy is disabled.

Comment thread src/field/crypto_bigint_boxed_monty.rs
@frozenspider
frozenspider requested a review from zkfriendly August 4, 2026 09:23
@frozenspider

Copy link
Copy Markdown
Collaborator Author

Thanks @zkfriendly, nice catch! Both concerns were addressed - although there's no CI workflow for now that can catch this feature combination

@zkfriendly zkfriendly left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for addressing concerns

@frozenspider
frozenspider merged commit 3c4232b into main Aug 4, 2026
11 checks passed
@frozenspider
frozenspider deleted the f/zerocopy branch August 4, 2026 16:45
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