hopper-framework 0.1.0

Zero-copy state framework for Solana. Typed account architecture, phased execution, validation graphs, zero-copy collections, layout evolution, and cross-program interfaces. Built on Hopper Native. no_std, no_alloc, no proc macros required.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! `Vec<u8>` carries a heap pointer and a length, neither of which are
//! valid Pod. The `#[hopper::pod]` macro must reject it via the
//! field-level `__FieldPodProof<T: bytemuck::Pod + Zeroable>` marker.
//! Any struct body that lands a heap-allocated field in a zero-copy
//! layout would corrupt the account on every load.

extern crate alloc;

use hopper::pod;

#[pod]
#[derive(Clone)]
#[repr(C)]
pub struct BadHeap {
    pub tail: alloc::vec::Vec<u8>,
}

fn main() {}