Based on docs, tiledb is embeddable c/c++ lib, I wonder if there are some docs or tips on how to embed or bundle the tiledb lib with the end product (instead of requiring users to install tiledb system-wise).
This is true, the core TileDB package is built as a single C++ library. Distributing this library will largely depend on your build and target environments. Could you tell me a little more about your current build process and where/how you are planning to ship your application? Are you using a cloud backend (S3, Azure, GCS)? Are you using any of our higher-level API libraries (R, Python)?
Here is our c++ lib https://github.com/RGLab/cytolib
which can be either installed through cmake as standalone lib at system level or use R CMD INSTALL to build it as a R package to be compiled and linked against to other R packages.
This R package doesn’t serve as R frontend/API though, just for the purpose of exposing header and static libs to other R package.
I know I can follow https://docs.tiledb.com/main/installation/building-from-source/c-cpp
to use bootstrap and make command to build tiledb as static lib.
Just wonder if there is even more compact way of shipping it along with cytolib. (given the wording of “embedded”).
And yes, we will enable s3 backend feature.
Hi @mikejiang,
Just wonder if there is even more compact way of shipping it along with cytolib. (given the wording of “embedded”).
Naive static linking should add 5-10MB to your binary – see tiledb · PyPI for a comparable example: the wheels there contain a libtiledb.so
which statically links to all of TileDB’s dependencies (plus the binding layer .so and some python code). With stripped symbols and some other tricks, you might be able to shave up to a few MB off (just guessing based on previous work). Note that the wheels include both Intel TBB and S3 support.
@seth said he will take a look at using TileDB’s CMake as a sub-project in another superbuild, because he has investigated doing so in the past.
@mikejiang I took a look at the cytolib project. This project seems to only build the libraries and install them but does not actually link the thirdparty dependencies to libcytolib
is the correct?
I forked the repository and pushed a commit that adds TileDB build support similar to the other thirdparty libraries. I used external project from cmake for the building of TileDB. It currently pulls TileDB 2.0.0 from github, you could switch it to a local tarball of the source similar to the other thirdparty packages.
Please let me know if you have any questions, or if you need help linking against the compiled library in the other higher level packages that use cytolib.