The compilation overhead in the Rust wrapper seems worse as compared with a baseline compilation with cc and make. The subsequent compilation of the main Rust app also goes smoother once RockDB is separately pre-compiled.
I can largely avoid the issue by precompiling RocksDB and linking, i.e., bypassing this wrapper.
I would assume with a dependency of this size, about 500k lines of C++, which generates 5-10 GB of build intermediates on AMD64... I would think there would be some sort of advanced caching mechanism system-wide. At least presented to the user, if not enabled-by-default.