Rust-rocksdb: Upgrade to the latest RocksDB core library

Created on 4 Nov 2018  ·  11Comments  ·  Source: rust-rocksdb/rust-rocksdb

The rust binding is currently targeting version 5.14.2 of the core library, but 5.15.10 was released a little over a month ago. We should upgrade to the latest version, assuming it doesn't result in any breaking/surprising changes (version 5.15.0 introduced API changes and new features).

enhancement

Most helpful comment

I'm going to assume #166 achieves the dynamic linkage requirement unless someone says otherwise. The current version of RocksDB as of today is 5.17.2 and is getting close to 4 months old. I'll make a pass at updating to the latest version.

All 11 comments

I don't know a lot about autogenerated bindings, but is it possible to maybe move something like a dynamic linking?
For example, in the leveldb bindings ( https://github.com/skade/leveldb-sys ) you need to install libleveldb-dev from the distribution repository and then it doesn't need to compile the whole thing every time, so it compiles only the bindings which takes a few seconds.

Here only compiling librocksdb-sys can take a few minutes, because (I assume) it compiles the C++ code of rocksdb.

This way it will also solve the versioning problem. As long as facebook maintains the public API the same, the user will be the one in charge of the core version and not the maintainers of the bindings.

@elichai good point. I thought about this too and I'm planning to do this in the future.

I guess I'm torn on this. I like the convenience of statically linking the library and not needing additional dependencies installed. Cache prevents the need to constantly recompile the library, so I'm not bothered by needing to compile the whole thing once. Given that it's been statically included for so long, I'd want to get the communities' thoughts on the matter, perhaps in a different issue.

I'd like to allow both static and dynamic linkage (probably by using features) - this would be the most flexible approach as for me. Compile time is not an issue right now for the library itself, but it also affects compile time of other projects which depend on us, which is unfortunate.

@vitvakatu exactly. for the library it self the compile time is ok. but when I compile my project it gets "stuck" for a way longer time on librocksdb-sys than on other dependencies (magnitude of order longer, like instead of a few seconds it can take even upwards of a minute)

@vitvakatu I like that idea (supporting both).

Does #166 achieve this already? Perhaps for both static and dynamic linking is already supported but just not well documented or ergonomic?

I'm going to assume #166 achieves the dynamic linkage requirement unless someone says otherwise. The current version of RocksDB as of today is 5.17.2 and is getting close to 4 months old. I'll make a pass at updating to the latest version.

Fixed in #261. Thanks @aleksuss!

Just to clarify, If I want dynamic linking I should add the env var ROCKSDB_LIB_DIR with the location of the .so/.a in it, right?

@elichai yes

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jonhoo picture jonhoo  ·  22Comments

iSynaptic picture iSynaptic  ·  5Comments

rrichardson picture rrichardson  ·  7Comments

cetra3 picture cetra3  ·  9Comments

zach-schoenberger picture zach-schoenberger  ·  7Comments