Skip to content

aowlspt_abi.h

Source: abi/aowlspt_abi.h — 705 lines, 0 file-scope functions.

What this header owns

Reproduced verbatim from the header's own banner comment — these notes are frequently the only written record of why the subsystem is shaped the way it is.

text
 aowlspt_abi.h — the one contract between a compiled mod and its host.

A mod is a native shared library (.dll). A host is whatever loaded it: the
aowlspt backend (the server process), the IL2CPP client host injected into
the game, or the out-of-game simulator. All three are nimony today, and the
two this file was first written for -- an SPT 4.x C# server and a BepInEx
plugin -- are gone: post-1.0 Tarkov is IL2CPP, so there are no managed
assemblies to plug into and nothing to write a C# host against. Neither side
knows the other's language; both know this file.

Design rules, in the order they matter:

 1. C ABI only. No C++, no name mangling, no exceptions across the boundary.
    Every cross-boundary function is `cdecl` and returns a status code.

 2. One allocator. The host owns it. A mingw-built DLL and a .NET host do not
    share a CRT heap, so a buffer allocated on one side and freed on the other
    is a crash waiting for a busy raid. Anything that outlives a call is
    allocated with `AowlHostApi.alloc` and freed with `AowlHostApi.free`,
    whichever side does it.

 3. Borrowed in, owned out. An `AowlSlice` passed *into* a function is valid
    only for that call — copy it if you need it later. To hand data back, fill
    an `AowlBuffer` using the host allocator; the receiver frees it.

 4. Additive versioning. Structs carry their own `size` as the first field.
    New fields are appended, never inserted or reordered, and a peer checks
    `size` before touching anything added after v1. `AOWLSPT_ABI_VERSION`
    bumps only on a genuinely breaking change.

 5. No SPT types here. The typed SPT model surface is generated per SPT
    version and travels as encoded payloads; this header stays stable while
    BSG and SPT churn underneath it.

Constants

  • AOWLSPT_ABI_H
  • AOWLSPT_ABI_REVISION
  • AOWLSPT_ABI_VERSION
  • AOWLSPT_ERR_ABI
  • AOWLSPT_ERR_BAD_ARG
  • AOWLSPT_ERR_CONFIG_PARSE
  • AOWLSPT_ERR_DECODE
  • AOWLSPT_ERR_DISPOSED
  • AOWLSPT_ERR_GENERIC
  • AOWLSPT_ERR_MOD_FAULT
  • AOWLSPT_ERR_NOT_FOUND
  • AOWLSPT_ERR_UNSUPPORTED
  • AOWLSPT_ERR_WRONG_THREAD
  • AOWLSPT_HOSTAPI_SIZE_REV1
  • AOWLSPT_HOSTAPI_SIZE_REV2
  • AOWLSPT_HOSTAPI_SIZE_REV3
  • AOWLSPT_HOSTAPI_SIZE_REV4
  • AOWLSPT_HOSTAPI_SIZE_REV5
  • AOWLSPT_HOSTAPI_SIZE_REV6
  • AOWLSPT_NULL_HANDLE
  • AOWLSPT_OK
  • AOWLSPT_PATCH_ARGS
  • AOWLSPT_PATCH_SKIP
  • AOWLSPT_SYM_ABI_VERSION
  • AOWLSPT_SYM_DESCRIBE
  • AOWLSPT_SYM_INIT

Types

  • struct AowlBuffer
  • struct AowlHostApi
  • struct AowlHostInfo
  • struct AowlModApi
  • struct AowlModInfo
  • struct AowlSlice

Functions

None at file scope. This header is types, constants or inline macros only.

aoughwl — self-hosted platform for things n stuff. Contact / Support on Discord for access to the private backends.