This repo is a minimal playground for Solana’s SBF (SBPF) runtime.
program/
– a tiny on-chain program (sbf_program
) that increments the first byte of the first writable account’s data by the first byte of the instruction data.demo/
– a host-side binary that builds an input buffer, feeds it to the Solana RBPF virtual machine, and prints the account data before/after execution plus a short trace.
# 1. Build the on-chain program (creates target/deploy/sbf_program.so)
cargo build-sbf
# 2. Run the host-side demo, passing the compiled .so
cargo run --manifest-path demo/Cargo.toml -- target/deploy/sbf_program.so