Skip to main content

hopper_runtime/
syscall.rs

1//! Small Hopper-owned wrappers for individual runtime syscalls used directly by
2//! framework crates.
3
4/// Emit the current compute-unit counter.
5#[inline(always)]
6pub fn sol_log_compute_units() {
7    #[cfg(target_os = "solana")]
8    // SAFETY: This block is part of Hopper's reviewed zero-copy/backend boundary; surrounding checks and caller contracts uphold the required raw-pointer, layout, and aliasing invariants.
9    unsafe {
10        hopper_native::syscalls::sol_log_compute_units_();
11    }
12}