Skip to content
fn

abi_version

→int
int abi_version()

Returns the engine's ABI generation counter at runtime.

Returns

int

Value of LUCID_ABI_VERSION at the time the engine shared library was built.

Notes

The Python bindings call this on first import and compare it against the constant baked into the extension module's translation unit. A mismatch indicates that the loaded .dylib was built from headers different from the ones the bindings saw, and the import is aborted with a diagnostic naming both versions.

Examples

Pseudo-code for the import-time check::
    if (engine.abi_version() != LUCID_ABI_VERSION)
        throw ImportError("Lucid ABI mismatch …");