v3.3.0
Added
Amx::pri()/Amx::alt()— safe reads of the VM's primary and
alternate accumulator registers, completing the register set alongside the
existingcip/frame/stack/heap/stp. Read directly from the
#[repr(C, packed)]AMXstruct withread_unaligned(taking a reference
to a packed field is UB), returningNonewhen the VM pointer is null.Amx::read_code(offset)— bounds-checked read of a 32-bit cell from the
code segment, the instruction-side counterpart ofread_cell. Resolves
base + header.cod + offsetand validatesoffsetagainst the code segment
[0, header.dat - header.cod), reading byte-wise (the header is packed). The
SDK exposes the raw bytes only; decoding the instruction is up to the consumer.Amx::opcode_table(count)— returns the VM'samx_opcodelist(the opcode
→ handler-address dispatch table) ascountraw addresses, fetched the way the
loader does it (set theBROWSEflag, callamx_Execwith index 0, restore the
flags). On computed-goto builds (GCC/Clang — SA-MP and open.mp) the loader
rewrites code-segment opcodes to these addresses, so a consumer can invert the
table to recover the real opcode behind aread_codevalue. ReturnsNonefor
a non-relocated image (AMX_FLAG_RELOCunset), where opcodes are stored raw.
Crate versions
rust-samp-sdk(libsamp_sdk): 3.1.0 → 3.2.0 (additive public API)rust-samp(libsamp): 3.2.0 — unchangedrust-samp-codegen(libsamp_codegen): 1.3.0 — unchanged
Full Changelog: v3.2.0...v3.3.0