rust-samp-codegen
Proc macros that generate the FFI boilerplate for
rust-samp plugins.
Provides:
#[native(name = "Pawn_Name")]— turns a Rust method or associated function into a Pawn-callable native. Generates theextern "C"wrapper, argument parsing viaAmxCell, panic isolation, and the__samp_reg_*registration function. DetectsResult<T, E>vsTreturn types automatically.initialize_plugin!(type: T, natives: [...])— emits the SA-MP entry points (Load,Unload,AmxLoad,AmxUnload,Supports,ProcessTick) and the open.mpComponentEntryPoint, including the vtable definitions for both Itanium (Linux GCC) and MSVC ABIs.#[derive(SampPlugin)]— generatesimpl SampPlugin for T {}with all defaults.
Re-exported by rust-samp; you do not need to depend on this crate
directly unless you are building tooling on top of the codegen.
[]
# Re-exported by `rust-samp`; depend on `rust-samp-codegen` only for
# tooling that targets the macros directly.
= { = "rust-samp-codegen", = "1" }