Open mewim opened 2 weeks ago
The rust API just manually links all the dependencies (I'm not sure what sort of build script support go has). But particularly if we're adding more APIs that use them having something centralized that they can all make use of would be helpful instead of having to keep each list of libraries updated. https://github.com/kuzudb/kuzu/blob/27c5ef56639743e13372f9035f6af6ac4c5f423f/tools/rust_api/build.rs#L37-L49 I'd looked into it briefly and came to the conclusion that it should be possible by manually combining the libraries but there is no simple solution available with CMake.
The rust API just manually links all the dependencies (I'm not sure what sort of build script support go has). But particularly if we're adding more APIs that use them having something centralized that they can all make use of would be helpful instead of having to keep each list of libraries updated.
I'd looked into it briefly and came to the conclusion that it should be possible by manually combining the libraries but there is no simple solution available with CMake.
I think it would be better to have an all-in-one static lib so we do not have to do it in each API. It can also make it easier for the user if they are statically linking kuzu to their application. It seems that in CMake, the way to do it is through custom command.
API
C++
Description
Currently the build process generates a static archive file
libkuzu.a
, but it does not contain all third-party libraries. We do not publish the static archive for now, and our dynamic lib does contain all the third-party libraries. However, Go apps prefer static linking. It is better to provide static library with everything bundled for it.