Skip to content

AlxLib 1.4.1

Choose a tag to compare

@AlexisVon AlexisVon released this 03 Nov 11:10
· 3 commits to main since this release

Minor release — a link names its own handle types, the host gains a type query surface, and the error classes split.

A link names its own handle types (1.4.0): fwrap::bind(uint_64 rid, const char* name, desc, view) — taken from LINK_LOAD only — registers the handle's type id (anyptr_ex<T>::rid, a compile-time constant) under a printable name with an optional summary and view payload. The table is per engine, committed only when the load entry returns normally, and a module's entries are dropped when its last instance goes. A second registration of the same id answers false; the link decides whether to raise.

The host can query: engine::type(v) answers the name the script's own type() gives — built-in names, then the owning link's registered name, then the host's set_type_extend callback, then "unknown"; engine::desc / engine::view answer the registered summary and payload (opaque to the engine). hook_info::wktype / wkdesc / wkview mirror all three inside a hook callback, so hkdt stays the host's own cookie.

fwrap is one interface with four implementations: native call, load, create, teardown. A call the context does not allow throws ContextError; the registration face returns bool — bind(name, fn[, area]) binds one native (creating an empty area when absent), bind(area, obj, methods) creates an area carrying the object (create-only, the object moving in on success), and wrap<T>(obj, area, methods) is exactly bind(area, anyptr_ex<T>::make(obj), methods).

The error classes split (1.4.1): link failures report LinkError (was ImportError); ImportError stays import-side; the fwrap misuse that used to be LinkError is now ContextError (id 16). engine::running() → is_running(), set_type_ex → set_type_extend(); anyptr gains a compile-time rid() and moves now leave a clean null handle.

Benchmark (2026-11-03): weighted GEOMEAN 206/311, recorded in doc/scpt/bench.md.

No opcode or AST change: vtype is untouched and .axp products need no recompilation. The minor release moves the SONAME to .so.1.4 and every link module must be rebuilt; the 1.4.1 patch keeps it.

Build packages — AlxLib-1.4.1-linux-x64-g3602919-slim.tar.gz (+ .sha256): the public headers, the merged static library (lib/libalxlib.a) and the notices; the shared libraries and per-module archives stay in the developer package and are not published. The Windows packages follow.