Skip to content

Conversation

@jordy25519
Copy link
Contributor

@jordy25519 jordy25519 commented Nov 6, 2025

Changes

  • any structs with zero_copy(unsafe) and u/i128 fields are now marked with legacy_layout macro (rewrites definition to use compat::u128/i128 + adds getter/setters with internal conversions to/from std::primitive types)
  • anchor_lang::Discriminator changed to use &[u8] instead of [u8; 8]

Notes

  • newly created accounts should be safe to create with i/u128 fields without the macro
  • devs should be aware of the u128/i128 math now needing an extra conversion. prefer using getter/setter over raw field accessself.scaled_balance()
  • an idl-build feature is required in Cargo.tomls for IDL build from now on and added to all deps involved

Complementary PRs

@jordy25519 jordy25519 mentioned this pull request Nov 17, 2025
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