I maintain the nodejs foundationdb bindings. As the API evolves and changes, I’m trying to figure out what I should be setting FDB_API_VERSION
to in the header.
It looks like:
- Setting it to a low value will restrict what API features my bindings can expose
- Setting it to a high value (eg 600) will stop my binding building without a new version of the foundationdb client library; which might be a pain for users. (And can you even use an older
libfdb_c.dylib
with a program that uses a newer header version?)
Obviously for the in-tree bindings (C, python, java, go) the header version tracks the current version. But what about for bindings like mine?
And each binding seems to be following a different strategy:
- The rust bindings make it configurable as a crate option and allow you to override
header_version
in the call tofdb_select_api_version_impl
- The swift bindings use header version 500 for compatibility
- The C# bindings call
fdb_get_max_api_version
and pass that in as the header version at runtime.
Whats the right / best approach here?