Skip to content

Commit df71fed

Browse files
committed
Remove the feature and always use the vendored version
1 parent d5bef4f commit df71fed

File tree

4 files changed

+23
-42
lines changed

4 files changed

+23
-42
lines changed

README.md

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,6 @@ This library is able to serialize all kind of types, not just bytes slices, even
1313

1414
Go check out [the examples](heed/examples/).
1515

16-
## Vendoring
17-
18-
By default, if LMDB is installed on the system, this crate will attempt to make use of the system-available LMDB.
19-
To force installation from source, build this crate with the `vendored` feature.
20-
2116
## Building from Source
2217

2318
### Using the system LMDB if available
@@ -35,11 +30,3 @@ However, if you already cloned it and forgot about the initialising the submodul
3530
```bash
3631
git submodule update --init
3732
```
38-
39-
### Always vendoring
40-
41-
```bash
42-
git clone --recursive https://github.com/meilisearch/heed.git
43-
cd heed
44-
cargo build --features vendored
45-
```

heed/Cargo.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,6 @@ url = "2.3.1"
3535
# like the `EnvOpenOptions` struct.
3636
default = ["serde", "serde-bincode", "serde-json"]
3737

38-
# Use the provided version of LMDB instead of the one that is installed on the system.
39-
vendored = ["lmdb-master-sys/vendored"]
40-
4138
# The NO_TLS flag is automatically set on Env opening and
4239
# RoTxn implements the Sync trait. This allow the user to reference
4340
# a read-only transaction from multiple threads at the same time.

lmdb-master-sys/Cargo.toml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ pkg-config = "0.3.26"
3232

3333
[features]
3434
default = []
35-
vendored = []
36-
with-asan = ["vendored"]
37-
with-fuzzer = ["vendored"]
38-
with-fuzzer-no-link = ["vendored"]
35+
with-asan = []
36+
with-fuzzer = []
37+
with-fuzzer-no-link = []

lmdb-master-sys/build.rs

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -31,27 +31,25 @@ fn main() {
3131
warn!("Building with `-fsanitize=fuzzer`.");
3232
}
3333

34-
if cfg!(feature = "vendored") || pkg_config::find_library("lmdb").is_err() {
35-
let mut builder = cc::Build::new();
36-
37-
builder
38-
.file(lmdb.join("mdb.c"))
39-
.file(lmdb.join("midl.c"))
40-
// https://github.com/mozilla/lmdb/blob/b7df2cac50fb41e8bd16aab4cc5fd167be9e032a/libraries/liblmdb/Makefile#L23
41-
.flag_if_supported("-Wno-unused-parameter")
42-
.flag_if_supported("-Wbad-function-cast")
43-
.flag_if_supported("-Wuninitialized");
44-
45-
if cfg!(feature = "with-asan") {
46-
builder.flag("-fsanitize=address");
47-
}
48-
49-
if cfg!(feature = "with-fuzzer") {
50-
builder.flag("-fsanitize=fuzzer");
51-
} else if cfg!(feature = "with-fuzzer-no-link") {
52-
builder.flag("-fsanitize=fuzzer-no-link");
53-
}
54-
55-
builder.compile("liblmdb.a")
34+
let mut builder = cc::Build::new();
35+
36+
builder
37+
.file(lmdb.join("mdb.c"))
38+
.file(lmdb.join("midl.c"))
39+
// https://github.com/mozilla/lmdb/blob/b7df2cac50fb41e8bd16aab4cc5fd167be9e032a/libraries/liblmdb/Makefile#L23
40+
.flag_if_supported("-Wno-unused-parameter")
41+
.flag_if_supported("-Wbad-function-cast")
42+
.flag_if_supported("-Wuninitialized");
43+
44+
if cfg!(feature = "with-asan") {
45+
builder.flag("-fsanitize=address");
5646
}
47+
48+
if cfg!(feature = "with-fuzzer") {
49+
builder.flag("-fsanitize=fuzzer");
50+
} else if cfg!(feature = "with-fuzzer-no-link") {
51+
builder.flag("-fsanitize=fuzzer-no-link");
52+
}
53+
54+
builder.compile("liblmdb.a")
5755
}

0 commit comments

Comments
 (0)