Summary
The cdylib exports no version symbol, so a binding cannot detect at runtime which library build it is talking to. Requesting a nodedb_version export.
Checked on origin/main @ ee9ccdd: no version export exists in nodedb-lite-ffi (the crate version is used internally for the sync client_version string, but is not exposed to callers).
Why it matters
Bindings load the library by name (-lnodedb_lite_ffi / dlopen). When the ABI grows or behavior changes, a stale .so on the library path fails late and confusingly: missing symbols abort at first call, and behavior changes fail silently. Our binding currently pins the build by comparing sha256sum of the .so against a recorded hash — workable, but it can only say "different", not "which one", and it breaks on every rebuild even when nothing relevant changed.
Suggested change
// Static string, no allocation, safe to call before any open.
const char *nodedb_version(void); // e.g. "0.5.0+ee9ccdd"
Compile-time from CARGO_PKG_VERSION (plus git short-sha if available at build time). A companion integer form (uint32_t nodedb_abi_version(void)) bumped on breaking FFI changes would let bindings fail fast with a clear message instead of dying on a missing symbol.
Summary
The cdylib exports no version symbol, so a binding cannot detect at runtime which library build it is talking to. Requesting a
nodedb_versionexport.Checked on
origin/main @ ee9ccdd: no version export exists innodedb-lite-ffi(the crate version is used internally for the syncclient_versionstring, but is not exposed to callers).Why it matters
Bindings load the library by name (
-lnodedb_lite_ffi/ dlopen). When the ABI grows or behavior changes, a stale.soon the library path fails late and confusingly: missing symbols abort at first call, and behavior changes fail silently. Our binding currently pins the build by comparingsha256sumof the.soagainst a recorded hash — workable, but it can only say "different", not "which one", and it breaks on every rebuild even when nothing relevant changed.Suggested change
Compile-time from
CARGO_PKG_VERSION(plus git short-sha if available at build time). A companion integer form (uint32_t nodedb_abi_version(void)) bumped on breaking FFI changes would let bindings fail fast with a clear message instead of dying on a missing symbol.