rust-samp-sdk
Low-level FFI bindings for the SA-MP AMX virtual machine and the open.mp native component ABI.
Used internally by rust-samp. Depend
on it directly only if you need raw access — for example, to bind a new
open.mp IComponent interface that the high-level crate does not expose
yet, or to write a custom plugin runtime that bypasses the macros and
lifecycle management.
[]
= { = "rust-samp-sdk", = "3" }
What it provides
- Type-safe wrappers around the
amx_*exports (Amx::register,exec,find_native,find_public,find_pubvar,allot*,push,strlen). - AMX cell conversion:
AmxCellandCellConverttraits for primitives, references, buffers and strings. Buffer,UnsizedBuffer,AmxStringwith lazy UTF-8 decoding and ergonomicwrite_str/iter_ashelpers.- open.mp native component bindings:
IComponent,IUIDProvider,IPawnComponent,IPawnScript,IEventDispatcher,ITimersComponent,ILogger. Vtables are verified against both Itanium (Linux GCC) and MSVC ABIs at runtime. OmpComponentHandletrait +omp_queryfor typed access to any component by UID.
Target
The SDK targets i686-unknown-linux-gnu, i686-pc-windows-msvc and
i686-pc-windows-gnu. The latter only supports SA-MP — native open.mp
requires an MSVC- or Itanium-compatible ABI.