-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add rocksdb sources to the go package #90
Comments
@anatol Adding rocksdb and its dependency code base makes the repository heavy and makes compile time much higher than before. Not only that, RocksDB is not C but C++. Making go <> c++ interoperability is very high cost. |
True, rocksdb is a heavy dependency and requires a lot of time to compile unfortunately.
You already use this C++-C bridge with your CGO method. Using amalgamated sources does not change anything here. In fact, joining sources into one compilation unit allows compiler to use more optimizations. |
it's pretty easy to manage c dependencies with nix, but need this small change though: #100 |
I will close this ticket. Thank you all for the suggestion. |
Hi y'all,
I am trying to use this package for my go project and I found its installation/setup procedure quite complicated. By default the package gives following compilation error:
To use
grocksdb
bindings additional steps are required to compile rocksdb and its dependencies.A better solution would be to let cgo compile the rocksdb sources. Similar to how sqlite3 go bindings do. cgo just picks *.c files stored together with go sources then compiles and automatically links it.
This requires an amalgamation file (i.e. a single file that contains all project sources) to be provided by rocksdb project (like sqlite does). It turns out rocksdb has a tool for that https://github.com/facebook/rocksdb/blob/main/build_tools/amalgamate.py that aim to achieve what we need.
The text was updated successfully, but these errors were encountered: