Expand description
Low-level layer of the rust-samp toolkit.
This crate concentrates two independent sets of bindings:
- AMX: pointers, cell types, function table and error codes of the
Pawn VM used by SA-MP (modules
raw,amx,cell,args,error,exports,consts). - Open Multiplayer: vtables, binary layout of
IComponentand typed wrappers of the native server interfaces (moduleomp, active while thesamp-onlyfeature is not enabled).
The interface of this crate works on raw pointers and is unsafe-friendly.
To write plugins, use the samp crate (workspace root) — it re-exports
this SDK and adds the plugin life cycle and native registration via
proc macros (#[native], initialize_plugin!, #[derive(SampPlugin)]).
Modules§
- amx
- Safe API for a live AMX VM instance.
- args
- Parsing of arguments from a Pawn native call.
- cell
- Smart pointers for accessing AMX VM cells from safe Rust code.
- consts
- SA-MP ABI constants: plugin flags, offsets of the server’s exports table and internal AMX VM flags. Values identical to those in the C header.
- encoding
- Global encoding for Rust <-> AMX conversion (only with the
encodingfeature). - error
- Errors emitted by the AMX VM and the SA-MP
amx_*functions. - exports
- Typed access to the
amx_*functions exported by the server. - omp
- Native bindings for the Open Multiplayer SDK.
- raw
- Direct translation of the types and function pointers from the AMX C header.
Macros§
- exec_
public - Executes an AMX public function by name.