Skip to main content

samp_sdk/
lib.rs

1//! Low-level layer of the `rust-samp` toolkit.
2//!
3//! This crate concentrates two independent sets of bindings:
4//!
5//! - **AMX**: pointers, cell types, function table and error codes of the
6//!   Pawn VM used by SA-MP (modules [`raw`], [`amx`], [`cell`], [`args`],
7//!   [`error`], [`exports`], [`consts`]).
8//! - **Open Multiplayer**: vtables, binary layout of `IComponent` and typed wrappers
9//!   of the native server interfaces (module [`omp`], active while the
10//!   `samp-only` feature is not enabled).
11//!
12//! The interface of this crate works on raw pointers and is `unsafe`-friendly.
13//! To write plugins, use the `samp` crate (workspace root) — it re-exports
14//! this SDK and adds the plugin life cycle and native registration via
15//! proc macros (`#[native]`, `initialize_plugin!`, `#[derive(SampPlugin)]`).
16
17pub mod amx;
18pub mod args;
19pub mod cell;
20pub mod consts;
21#[cfg(feature = "encoding")]
22pub mod encoding;
23pub mod error;
24pub mod exports;
25#[doc(hidden)]
26pub mod macros;
27#[cfg(not(feature = "samp-only"))]
28pub mod omp;
29pub mod raw;
30#[cfg(test)]
31mod tests;