Bug 1543795 - configure lmdb-rkv-sys to use a smaller MDB_IDL_LOGN size r=nanj,glandium
authorMyk Melez <myk@mykzilla.org>
Tue, 16 Apr 2019 16:03:10 +0000
changeset 469699 ae91cf128a4c
parent 469698 c1a6d6ea370e
child 469700 fbd1effe6fe4
push id35879
push usernerli@mozilla.com
push dateTue, 16 Apr 2019 22:01:48 +0000
treeherdermozilla-central@12a60898fdc1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnanj, glandium
bugs1543795
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1543795 - configure lmdb-rkv-sys to use a smaller MDB_IDL_LOGN size r=nanj,glandium Configure the lmdb-rkv-sys Rust crate to use a smaller MDB_IDL_LOGN size in order to reduce allocations when opening an LMDB environment in read-write mode. @glandium I adopted the configuration strategy you suggested of creating a "feature" for each reasonable value for the MDB_IDL_LOGN macro. Fortunately, the range of reasonable values is fairly small. @nanj Based on your evalution in https://github.com/mozilla/lmdb/pull/2, a value of "9" for this macro should aggressively reduce the allocations while still supporting our existing use cases. But I'm open to increasing it, if you think a higher initial value would be preferable. Differential Revision: https://phabricator.services.mozilla.com/D27559
Cargo.lock
third_party/rust/lmdb-rkv-sys/.cargo-checksum.json
third_party/rust/lmdb-rkv-sys/Cargo.toml
third_party/rust/lmdb-rkv-sys/build.rs
third_party/rust/lmdb-rkv-sys/lmdb/libraries/liblmdb/midl.h
third_party/rust/lmdb-rkv-sys/src/lib.rs
toolkit/library/rust/shared/Cargo.toml
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1228,16 +1228,17 @@ dependencies = [
  "cubeb-sys 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "encoding_c 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "encoding_glue 0.1.0",
  "env_logger 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "geckoservo 0.0.1",
  "gkrust_utils 0.1.0",
  "jsrust_shared 0.1.0",
  "kvstore 0.1.0",
+ "lmdb-rkv-sys 0.8.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "mozurl 0.0.1",
  "mp4parse_capi 0.11.2",
  "netwerk_helper 0.0.1",
  "nserror 0.1.0",
  "nsstring 0.1.0",
  "prefs_parser 0.0.1",
  "profiler_helper 0.1.0",
@@ -1579,22 +1580,22 @@ source = "registry+https://github.com/ru
 
 [[package]]
 name = "lmdb-rkv"
 version = "0.11.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
- "lmdb-rkv-sys 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "lmdb-rkv-sys 0.8.3 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "lmdb-rkv-sys"
-version = "0.8.2"
+version = "0.8.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "cc 1.0.34 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
  "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -3587,17 +3588,17 @@ dependencies = [
 "checksum lazycell 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ce12306c4739d86ee97c23139f3a34ddf0387bbf181bc7929d287025a8c3ef6b"
 "checksum lazycell 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a6f08839bc70ef4a3fe1d566d5350f519c5912ea86be0df1740a7d247c7fc0ef"
 "checksum libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)" = "bedcc7a809076656486ffe045abeeac163da1b558e963a31e29fbfbeba916917"
 "checksum libloading 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9c3ad660d7cb8c5822cd83d10897b0f1f1526792737a179e73896152f85b88c2"
 "checksum libudev 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ea626d3bdf40a1c5aee3bcd4f40826970cae8d80a8fec934c82a63840094dcfe"
 "checksum libz-sys 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)" = "3fdd64ef8ee652185674455c1d450b83cbc8ad895625d543b5324d923f82e4d8"
 "checksum linked-hash-map 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "70fb39025bc7cdd76305867c4eccf2f2dcf6e9a57f5b21a93e1c2d86cd03ec9e"
 "checksum lmdb-rkv 0.11.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1452294309db7977dc75e1e8135a8c654d9e52e04ff0c0bd06c880897a91defd"
-"checksum lmdb-rkv-sys 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "96846a2e6785ec0fce6577479d18273c8e5b287e6df8a1b398b7f0f7a41cdcbb"
+"checksum lmdb-rkv-sys 0.8.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1470e0168f1832e35afd6d0931ae60db625685332837b97aa156773ec9c5e393"
 "checksum lock_api 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "62ebf1391f6acad60e5c8b43706dde4582df75c06698ab44511d15016bc2442c"
 "checksum log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b"
 "checksum log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c84ec4b527950aa83a329754b01dbe3f58361d1c5efacd1f6d68c494d08a17c6"
 "checksum malloc_size_of_derive 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "35adee9ed962cf7d07d62cb58bc45029f3227f5b5b86246caa8632f06c187bc3"
 "checksum matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "100aabe6b8ff4e4a7e32c1c13523379802df0772b82466207ac25b013f193376"
 "checksum memchr 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "148fab2e51b4f1cfc66da2a7c32981d1d3c083a803978268bb11fe4b86925e7a"
 "checksum memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2efc7bc57c883d4a4d6e3246905283d8dae951bb3bd32f49d6ef297f546e1c39"
 "checksum memmap 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "46f3c7359028b31999287dae4e5047ddfe90a23b7dca2282ce759b491080c99b"
--- a/third_party/rust/lmdb-rkv-sys/.cargo-checksum.json
+++ b/third_party/rust/lmdb-rkv-sys/.cargo-checksum.json
@@ -1,1 +1,1 @@
-{"files":{"Cargo.toml":"89945728564108bb284dc515a9048ffaae5016b58ea8781d9f6af7e6d4ce9000","build.rs":"4204dd0891e2eca08cb7cbcccfb36d1bdac137651c383f4a36368478fd836402","lmdb/libraries/liblmdb/CHANGES":"12f41155ee12375b7ddeabd2f793399d3216e92bc44f1122d6f305b7637c2fec","lmdb/libraries/liblmdb/COPYRIGHT":"7cf04234accacc7b41b73fe6b3b19759fa49dee1ce705a9fa6533900400e4cca","lmdb/libraries/liblmdb/Doxyfile":"5545f6b049040ce58e6d1a603eaea6b7fb8ae92459f2ab8d3bcbacabcce1014d","lmdb/libraries/liblmdb/LICENSE":"310fe25c858a9515fc8c8d7d1f24a67c9496f84a91e0a0e41ea9975b1371e569","lmdb/libraries/liblmdb/Makefile":"60b5f574e6642602f692a95956da61c588a265ad50b8059960c230b9e6aaf4fd","lmdb/libraries/liblmdb/intro.doc":"9442e0db4fc9c70f058c43545e710476d8d5a80b959d20f4381240fd50c6b843","lmdb/libraries/liblmdb/lmdb.h":"a8194f7a061f4168d99de3c80464de5d279b2c851c24fdd102f1f14dd5828a77","lmdb/libraries/liblmdb/mdb.c":"87d29ea006d0c4dc31a1bc960e37db33c971abe8b3e73de5041813e0333ad8b5","lmdb/libraries/liblmdb/mdb_copy.1":"3a6a8a7a91e1bd42dc4d2a0188ff62d699ff2b3b097a670f30681decf63f22f3","lmdb/libraries/liblmdb/mdb_copy.c":"d3d412a770a5c3afeb88c44b4acdde0f0b985cde22497198e8f38296281cdddd","lmdb/libraries/liblmdb/mdb_dump.1":"9257be883c7fcfcbd61003cc730f7c0900fa8f6feba074c8c1e46634a257b13a","lmdb/libraries/liblmdb/mdb_dump.c":"b046cffcd997254e6daea47a2d7fb74f9d23282174cbb1e3bf9f5fb51a90fe64","lmdb/libraries/liblmdb/mdb_load.1":"ea927473245a4a7777ba687aa26baf7f0951fb620daf82b8d730a090185b2bbc","lmdb/libraries/liblmdb/mdb_load.c":"4f722613c65350315db23060be98584fb572978108885dab271101ba7187dca4","lmdb/libraries/liblmdb/mdb_stat.1":"c0a70d96b4b2d32e73301383d9d5620bc0bbbefb019bfd54f32088dfd4bc921a","lmdb/libraries/liblmdb/mdb_stat.c":"e6405fa191d784ecfa8eb8d1f153a58facc49a8f5a2c891a93802e67acc4861e","lmdb/libraries/liblmdb/midl.c":"92b0933c7736443448018a93f9588e9e26ae2e242f91b19211dea9ed3ab91141","lmdb/libraries/liblmdb/midl.h":"8e01e6c3b1cbd2e93a5a95686a6dd0ca43878b2b8cf0ba53962ccfe355605354","lmdb/libraries/liblmdb/mtest.c":"89ab9ac8bf1e14a9f32a33757c4b3254e4984e0f24e5a302e2d126eb2c86f6db","lmdb/libraries/liblmdb/mtest2.c":"076b00395fe1461dd9577f7bb5567908ce50cf470efbf652787e6fe1dc2fb68c","lmdb/libraries/liblmdb/mtest3.c":"51b9a055e123bd0757ee3082cc6864c836969cf630e646a9cc34e01398c20634","lmdb/libraries/liblmdb/mtest4.c":"b0a725405d80bda6ab95b3ecf410ae330ab8df7a081ca81dd6ea1f8db87642e9","lmdb/libraries/liblmdb/mtest5.c":"7f3b06ca3833315ea4c70d5e91feb1b677f6949f105f4f89d96c3ac35e104f2f","lmdb/libraries/liblmdb/mtest6.c":"e4d7880c36547ebf33bc020046730bf2c075c53aaacd5c876152cc5ae7ab5e6c","lmdb/libraries/liblmdb/sample-bdb.txt":"153d84f8fc49a3abba53ed52d5a41c8d6d4698753a10bbe0689a9e65d3513513","lmdb/libraries/liblmdb/sample-mdb.txt":"1f77385786cffdf72b33da06a91a444fe2827673c3627f89110903a8fe012795","lmdb/libraries/liblmdb/tooltag":"4734c6dc1fa7aec8c2e9646bd04bc5218ef6a03ad83a3b18de2ac4069eb94120","src/constants.rs":"af67740b5acccdc71b2267ec051bb60e5433c4f0313fe16dc0627376a52dcdff","src/ffi.rs":"caa9bbfb3868a7a9e9ad822d775e60ffa8c8c2f2450ac4ed403a93ddb7547899","src/lib.rs":"1d3222feec7b2b4e0902c3b9d7d37d51f5ae5cce8a3ff3dcf0256b7d78f0fecb"},"package":"96846a2e6785ec0fce6577479d18273c8e5b287e6df8a1b398b7f0f7a41cdcbb"}
\ No newline at end of file
+{"files":{"Cargo.toml":"60155c7f910da559c7ab932a66d0bede7c3734dbf9c4d2abeb4e23d5e4d0546a","build.rs":"d001be8ded3d94c0ae26dd355b5481dc6c0e20e05ea55cbfbb9df572e0678fbc","lmdb/libraries/liblmdb/CHANGES":"12f41155ee12375b7ddeabd2f793399d3216e92bc44f1122d6f305b7637c2fec","lmdb/libraries/liblmdb/COPYRIGHT":"7cf04234accacc7b41b73fe6b3b19759fa49dee1ce705a9fa6533900400e4cca","lmdb/libraries/liblmdb/Doxyfile":"5545f6b049040ce58e6d1a603eaea6b7fb8ae92459f2ab8d3bcbacabcce1014d","lmdb/libraries/liblmdb/LICENSE":"310fe25c858a9515fc8c8d7d1f24a67c9496f84a91e0a0e41ea9975b1371e569","lmdb/libraries/liblmdb/Makefile":"60b5f574e6642602f692a95956da61c588a265ad50b8059960c230b9e6aaf4fd","lmdb/libraries/liblmdb/intro.doc":"9442e0db4fc9c70f058c43545e710476d8d5a80b959d20f4381240fd50c6b843","lmdb/libraries/liblmdb/lmdb.h":"a8194f7a061f4168d99de3c80464de5d279b2c851c24fdd102f1f14dd5828a77","lmdb/libraries/liblmdb/mdb.c":"87d29ea006d0c4dc31a1bc960e37db33c971abe8b3e73de5041813e0333ad8b5","lmdb/libraries/liblmdb/mdb_copy.1":"3a6a8a7a91e1bd42dc4d2a0188ff62d699ff2b3b097a670f30681decf63f22f3","lmdb/libraries/liblmdb/mdb_copy.c":"d3d412a770a5c3afeb88c44b4acdde0f0b985cde22497198e8f38296281cdddd","lmdb/libraries/liblmdb/mdb_dump.1":"9257be883c7fcfcbd61003cc730f7c0900fa8f6feba074c8c1e46634a257b13a","lmdb/libraries/liblmdb/mdb_dump.c":"b046cffcd997254e6daea47a2d7fb74f9d23282174cbb1e3bf9f5fb51a90fe64","lmdb/libraries/liblmdb/mdb_load.1":"ea927473245a4a7777ba687aa26baf7f0951fb620daf82b8d730a090185b2bbc","lmdb/libraries/liblmdb/mdb_load.c":"4f722613c65350315db23060be98584fb572978108885dab271101ba7187dca4","lmdb/libraries/liblmdb/mdb_stat.1":"c0a70d96b4b2d32e73301383d9d5620bc0bbbefb019bfd54f32088dfd4bc921a","lmdb/libraries/liblmdb/mdb_stat.c":"e6405fa191d784ecfa8eb8d1f153a58facc49a8f5a2c891a93802e67acc4861e","lmdb/libraries/liblmdb/midl.c":"92b0933c7736443448018a93f9588e9e26ae2e242f91b19211dea9ed3ab91141","lmdb/libraries/liblmdb/midl.h":"b8fa0d35b5505001d9f722f8f23993b8602c3599eb71ec869bb556f5e4ef2fde","lmdb/libraries/liblmdb/mtest.c":"89ab9ac8bf1e14a9f32a33757c4b3254e4984e0f24e5a302e2d126eb2c86f6db","lmdb/libraries/liblmdb/mtest2.c":"076b00395fe1461dd9577f7bb5567908ce50cf470efbf652787e6fe1dc2fb68c","lmdb/libraries/liblmdb/mtest3.c":"51b9a055e123bd0757ee3082cc6864c836969cf630e646a9cc34e01398c20634","lmdb/libraries/liblmdb/mtest4.c":"b0a725405d80bda6ab95b3ecf410ae330ab8df7a081ca81dd6ea1f8db87642e9","lmdb/libraries/liblmdb/mtest5.c":"7f3b06ca3833315ea4c70d5e91feb1b677f6949f105f4f89d96c3ac35e104f2f","lmdb/libraries/liblmdb/mtest6.c":"e4d7880c36547ebf33bc020046730bf2c075c53aaacd5c876152cc5ae7ab5e6c","lmdb/libraries/liblmdb/sample-bdb.txt":"153d84f8fc49a3abba53ed52d5a41c8d6d4698753a10bbe0689a9e65d3513513","lmdb/libraries/liblmdb/sample-mdb.txt":"1f77385786cffdf72b33da06a91a444fe2827673c3627f89110903a8fe012795","lmdb/libraries/liblmdb/tooltag":"4734c6dc1fa7aec8c2e9646bd04bc5218ef6a03ad83a3b18de2ac4069eb94120","src/constants.rs":"af67740b5acccdc71b2267ec051bb60e5433c4f0313fe16dc0627376a52dcdff","src/ffi.rs":"caa9bbfb3868a7a9e9ad822d775e60ffa8c8c2f2450ac4ed403a93ddb7547899","src/lib.rs":"babc1389cd28645a92cf457096b70be8bf549ed1a0e404cfa32f328f854223ae"},"package":"1470e0168f1832e35afd6d0931ae60db625685332837b97aa156773ec9c5e393"}
\ No newline at end of file
--- a/third_party/rust/lmdb-rkv-sys/Cargo.toml
+++ b/third_party/rust/lmdb-rkv-sys/Cargo.toml
@@ -1,31 +1,42 @@
 # THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
 #
 # When uploading crates to the registry Cargo will automatically
 # "normalize" Cargo.toml files for maximal compatibility
 # with all versions of Cargo and also rewrite `path` dependencies
-# to registry (e.g. crates.io) dependencies
+# to registry (e.g., crates.io) dependencies
 #
 # If you believe there's an error in this file please file an
 # issue against the rust-lang/cargo repository. If you're
 # editing this file be aware that the upstream Cargo.toml
 # will likely look very different (and much more reasonable)
 
 [package]
 name = "lmdb-rkv-sys"
-version = "0.8.2"
+version = "0.8.3"
 authors = ["Dan Burkert <dan@danburkert.com>"]
 build = "build.rs"
 description = "Rust bindings for liblmdb."
 documentation = "https://docs.rs/lmdb-rkv-sys"
 readme = "../README.md"
 keywords = ["LMDB", "database", "storage-engine", "bindings", "library"]
 categories = ["database", "external-ffi-bindings"]
 license = "Apache-2.0"
 repository = "https://github.com/mozilla/lmdb-rs.git"
 [dependencies.libc]
 version = "0.2"
 [build-dependencies.cc]
 version = "1"
 
 [build-dependencies.pkg-config]
 version = "0.3.2"
+
+[features]
+default = []
+mdb_idl_logn_10 = []
+mdb_idl_logn_11 = []
+mdb_idl_logn_12 = []
+mdb_idl_logn_13 = []
+mdb_idl_logn_14 = []
+mdb_idl_logn_15 = []
+mdb_idl_logn_8 = []
+mdb_idl_logn_9 = []
--- a/third_party/rust/lmdb-rkv-sys/build.rs
+++ b/third_party/rust/lmdb-rkv-sys/build.rs
@@ -1,21 +1,50 @@
 extern crate pkg_config;
 extern crate cc;
 
 use std::env;
 use std::path::PathBuf;
 
+#[cfg(feature = "mdb_idl_logn_8")]
+const MDB_IDL_LOGN: u8 = 8;
+#[cfg(feature = "mdb_idl_logn_9")]
+const MDB_IDL_LOGN: u8 = 9;
+#[cfg(feature = "mdb_idl_logn_10")]
+const MDB_IDL_LOGN: u8 = 10;
+#[cfg(feature = "mdb_idl_logn_11")]
+const MDB_IDL_LOGN: u8 = 11;
+#[cfg(feature = "mdb_idl_logn_12")]
+const MDB_IDL_LOGN: u8 = 12;
+#[cfg(feature = "mdb_idl_logn_13")]
+const MDB_IDL_LOGN: u8 = 13;
+#[cfg(feature = "mdb_idl_logn_14")]
+const MDB_IDL_LOGN: u8 = 14;
+#[cfg(feature = "mdb_idl_logn_15")]
+const MDB_IDL_LOGN: u8 = 15;
+#[cfg(not(any(
+    feature = "mdb_idl_logn_8",
+    feature = "mdb_idl_logn_9",
+    feature = "mdb_idl_logn_10",
+    feature = "mdb_idl_logn_11",
+    feature = "mdb_idl_logn_12",
+    feature = "mdb_idl_logn_13",
+    feature = "mdb_idl_logn_14",
+    feature = "mdb_idl_logn_15",
+)))]
+const MDB_IDL_LOGN: u8 = 16;
+
 fn main() {
     let mut lmdb: PathBuf = PathBuf::from(&env::var("CARGO_MANIFEST_DIR").unwrap());
     lmdb.push("lmdb");
     lmdb.push("libraries");
     lmdb.push("liblmdb");
 
     if !pkg_config::find_library("liblmdb").is_ok() {
         cc::Build::new()
+                    .define("MDB_IDL_LOGN", Some(MDB_IDL_LOGN.to_string().as_str()))
                     .file(lmdb.join("mdb.c"))
                     .file(lmdb.join("midl.c"))
                     // https://github.com/LMDB/lmdb/blob/LMDB_0.9.21/libraries/liblmdb/Makefile#L25
                     .opt_level(2)
                     .compile("liblmdb.a")
     }
 }
--- a/third_party/rust/lmdb-rkv-sys/lmdb/libraries/liblmdb/midl.h
+++ b/third_party/rust/lmdb-rkv-sys/lmdb/libraries/liblmdb/midl.h
@@ -51,17 +51,19 @@ typedef size_t MDB_ID;
 	 * sorted in ascending order. For libmdb IDLs are sorted in
 	 * descending order.
 	 */
 typedef MDB_ID *MDB_IDL;
 
 /* IDL sizes - likely should be even bigger
  *   limiting factors: sizeof(ID), thread stack size
  */
+#ifndef MDB_IDL_LOGN
 #define	MDB_IDL_LOGN	16	/* DB_SIZE is 2^16, UM_SIZE is 2^17 */
+#endif
 #define MDB_IDL_DB_SIZE		(1<<MDB_IDL_LOGN)
 #define MDB_IDL_UM_SIZE		(1<<(MDB_IDL_LOGN+1))
 
 #define MDB_IDL_DB_MAX		(MDB_IDL_DB_SIZE-1)
 #define MDB_IDL_UM_MAX		(MDB_IDL_UM_SIZE-1)
 
 #define MDB_IDL_SIZEOF(ids)		(((ids)[0]+1) * sizeof(MDB_ID))
 #define MDB_IDL_IS_ZERO(ids) ( (ids)[0] == 0 )
--- a/third_party/rust/lmdb-rkv-sys/src/lib.rs
+++ b/third_party/rust/lmdb-rkv-sys/src/lib.rs
@@ -1,11 +1,11 @@
 #![allow(non_camel_case_types)]
 #![deny(warnings)]
-#![doc(html_root_url = "https://docs.rs/lmdb-rkv-sys/0.8.2")]
+#![doc(html_root_url = "https://docs.rs/lmdb-rkv-sys/0.8.3")]
 
 extern crate libc;
 
 #[cfg(unix)]
 #[allow(non_camel_case_types)]
 pub type mode_t = ::libc::mode_t;
 #[cfg(windows)]
 #[allow(non_camel_case_types)]
--- a/toolkit/library/rust/shared/Cargo.toml
+++ b/toolkit/library/rust/shared/Cargo.toml
@@ -3,16 +3,17 @@ name = "gkrust-shared"
 version = "0.1.0"
 authors = ["nobody@mozilla.org"]
 license = "MPL-2.0"
 description = "Shared Rust code for libxul"
 
 [dependencies]
 geckoservo = { path = "../../../../servo/ports/geckolib", optional = true }
 kvstore = { path = "../../../components/kvstore" }
+lmdb-rkv-sys = { version = "0.8.3", features = ["mdb_idl_logn_9"] }
 mp4parse_capi = { path = "../../../../media/mp4parse-rust/mp4parse_capi" }
 nserror = { path = "../../../../xpcom/rust/nserror" }
 nsstring = { path = "../../../../xpcom/rust/nsstring" }
 netwerk_helper = { path = "../../../../netwerk/base/rust-helper" }
 xpcom = { path = "../../../../xpcom/rust/xpcom" }
 prefs_parser = { path = "../../../../modules/libpref/parser" }
 profiler_helper = { path = "../../../../tools/profiler/rust-helper", optional = true }
 mozurl = { path = "../../../../netwerk/base/mozurl" }