Capabilities / memory.read
memory.read
@1PACKS ONLYReading bytes at an address in the game, for packs. A mod never sees it.
Packs only. These take an address, which a mod-visible capability may never do.
3 callsSurface as of 2026-10-21
A pack-only capability is absent from the import list a mod links against, so a mod that imports one is refused at load as asking for something the surface does not offer it. A pack is read by the host rather than linked against surface.h, so there is no C declaration to show here.
Types
TYPESfrom the IDL
Span { address: u64, length: u32 }Calls
read
read(address: u64, length: u32) -> Result<Blob>
read_manyBULK
read_many(spans: [Span]) -> [Result<Blob>]
valid
valid(address: u64, length: u32) -> bool
Errors
A call that returns Result crosses as a status: 0 is success, and the others are these errors, by their index in the capability.
ReadFaultUnsupported