Search across all documentation pages
10 pages in this section.
Why Solana account bytes need a layout: Borsh, discriminators, space and rent, realloc, versioning, and zero-copy trade-offs.
Learn to serialize account data in Solana with 10 Rust examples. Explore Borsh for small states and zero-copy for large, fixed-size data.
Learn how account discriminators identify data structures, prevent type confusion attacks, and validate account types in Solana programs.
Design Solana account data with Borsh structs. Learn to define, size, and version structs for stable field order and schema upgrades.
Learn how to resize Solana account data using realloc syscalls or CPIs. Understand rent implications, safety, and common pitfalls when growing or shrinking accounts.
Calculate Solana account space and rent-exempt minimum. Learn to sum discriminators and fields, query Rent, and avoid common sizing gotchas.
Learn best practices for Rust account data serialization. Design auditable, migration-friendly layouts resistant to type confusion and partial read/write bugs.
A single-page roundup of every highlight bullet from the 9 pages in the Serialization section, grouped by source page so you can scan all 53 takeaways without opening each article individually.