Expand description
Raw Solana syscall declarations.
These are the functions provided by the Solana BPF/SBF runtime. Only
available when compiling for target_os = "solana".
§Dual-mode dispatch (SIMD-0178 readiness)
Every declaration goes through define_syscall!, which emits one of two
equivalent forms depending on the active build:
-
Default (relocation). With neither the
static-syscallscargo feature nor thestatic-syscallstarget-feature enabled, the macro emits exactly the historicalextern "C"declaration. This is byte-for-byte the same relocation-based syscall the framework has always used, so the default build is unchanged. -
Static (sBPF v3 / SIMD-0178). When
static-syscallsis enabled, the macro instead emits anunsafe fnthat transmutes the murmur32 hash of the syscall name to the matchingextern "C"function pointer and calls it. This is the static-syscall ABI the sBPF v3 loader uses in place of syscall relocations (SIMD-0178), matching the referencesolana-define-syscallimplementation.
The feature is opt-in and default-off: it exists so Hopper is ready to
build for the v3 loader, without changing anything for today’s v0..v2
targets. The hash is computed at const-eval time from the syscall name; the
constants are pinned by host tests against known Agave values (e.g.
sol_memcmp_ → 0x5FDC_DE31).