#solana #linker #sbpf #cli

bin+lib sbpf-linker

Upstream BPF linker for SBPF V0/V3 programs

7 releases

Uses new Rust 2024

0.1.9 May 3, 2026
0.1.8 Feb 23, 2026
0.1.6 Dec 13, 2025
0.1.5 Oct 16, 2025

#8 in #sbpf

MIT license

37KB
776 lines

SBPF Linker

An upstream BPF linker to relink upstream BPF binaries into an SBPF V0 compatible binary format.

Install

cargo install sbpf-linker

Integrates the latest LLVM commits from the Blueshift LLVM fork to experiment with upcoming changes during the upstreaming process. cargo install-with-gallery detects the LLVM major from rustup run nightly rustc -vV and clones the matching gallery branch, currently upstream-gallery-21 or upstream-gallery-22, before building sbpf-linker with static LLVM linking.

cargo install-with-gallery 

Generate a Program

cargo generate --git https://github.com/blueshift-gg/solana-upstream-bpf-template
cargo +nightly build-bpf

Dependencies

~19–26MB
~420K SLoC