Registry / virtual-machine / solana-rbpf

solana-rbpf

JSON →
library0.8.5rscratesunverified

Virtual machine and JIT compiler for eBPF programs used in Solana.

# Cargo.toml [dependencies] solana_rbpf = "0.8.5"
INSTALL
IMPORT
SIG · SOLANA-RBPF
S
solana-rbpf
virtual-machinerustv0.8.5
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

EbpfVm
use solana_rbpf::vm::EbpfVm;

Loads an eBPF program and executes it in the virtual machine.

use solana_rbpf::vm::EbpfVm; use solana_rbpf::elf::Executable; let prog = &[0x95, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]; let executable = Executable::from_text_bytes(prog).unwrap(); let mut vm = EbpfVm::new(&executable).unwrap(); let result = vm.execute_program().unwrap();
Debug
Known issues
gotchaRequires nightly Rust for some features
fix
Use a stable toolchain or enable the 'nightly' feature flag.
affects: >=0.8.0
Upgrade
Version history
0.8.5latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
13 hits · last 30 days
node
12
Amazon
1
Resources
solana-rbpf — cargo add solana-rbpf · libregistry