SQLite Forum

Amalgamation file for specific extension
Login
> i understood the OP as meaning: is there a set of -Dxxxx options they can provide which will filter the core sqlite lib out of the build, leaving only the desired extension(s) in the output object file.

Would that not be exactly equivalent to just using the extension code alone?

Generally, an extension is written to use the then-published SQLite API, accessed via a jump-table passed to the extension's init function. Because of the backward and forward compatibility considerations you mention, extensions which rely on jump table entries which have not been there "forever" should check the SQLite version for sufficiency before using such entries. (I have not seen this done in extensions published by the SQLite project.) Otherwise, the penalty for using an old extension with a new version of the SQLite library could be a crash or other undefined behavior.