Skip to content

no-std interface#58

Merged
grod220 merged 1 commit intomainfrom
no-std-interface
Mar 23, 2026
Merged

no-std interface#58
grod220 merged 1 commit intomainfrom
no-std-interface

Conversation

@grod220
Copy link
Member

@grod220 grod220 commented Mar 23, 2026

This updates the interface crate to be no-std friendly using the newer solana crates, while preserving public API compatibility.

  • Update solana-pubkey to solana-address (it was an alias anyway)
  • Replaces use of spl-pod with solana-zero-copy
  • Switch OptionalNonZeroPubkey usage with solana-nullable's MaybeNull.

@grod220 grod220 force-pushed the no-std-interface branch 2 times, most recently from dbc7464 to 56d2c24 Compare March 23, 2026 09:07
let new_size = u64::from(self.size)
.checked_add(1)
.ok_or::<ProgramError>(PodSliceError::CalculationFailure.into())?;
.ok_or(ProgramError::ArithmeticOverflow)?;
Copy link
Member Author

Choose a reason for hiding this comment

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

The previous error eventually mapped to ProgramError::Custom(0). But think this one makes more sense to swap to.

Copy link
Contributor

Choose a reason for hiding this comment

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

Works for me!

@grod220 grod220 requested review from febo and joncinque March 23, 2026 09:48
Copy link
Contributor

@joncinque joncinque left a comment

Choose a reason for hiding this comment

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

Looks good to me!

let new_size = u64::from(self.size)
.checked_add(1)
.ok_or::<ProgramError>(PodSliceError::CalculationFailure.into())?;
.ok_or(ProgramError::ArithmeticOverflow)?;
Copy link
Contributor

Choose a reason for hiding this comment

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

Works for me!

@grod220 grod220 merged commit 19001a7 into main Mar 23, 2026
20 checks passed
@grod220 grod220 deleted the no-std-interface branch March 23, 2026 18:42
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