Capabilities / symbols
symbols
@1PACKS ONLYResolving a name, a pattern, a field offset or a type size through the pack.
Resolving a name, a pattern, a field offset or a type size through the pack.
Packs only, and the reason is the sandbox rule rather than a policy: resolving a symbol gives back where something is, and where something is is an address. A mod never asks this. It names a function to hook and the host resolves it, which is why hook takes a name.
4 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.
Calls
resolve
resolve(name: str) -> Result<u64>
scan
scan(pattern: str) -> Result<u64>
offset_of
offset_of(type: str, field: str) -> Result<u32>
A field offset and a type size are numbers rather than places, which is why these two can exist at all. They are still pack-visible, because a mod with an offset and a base has an address.
size_of
size_of(type: str) -> Result<u32>
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.
UnresolvedNoPack