mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-23 06:44:35 +00:00
Allow compilation with no slasher backend (#3888)
## Proposed Changes Allowing compiling without MDBX by running: ```bash CARGO_INSTALL_EXTRA_FLAGS="--no-default-features" make ``` The reasons to do this are several: - Save compilation time if the slasher won't be used - Work around compilation errors in slasher backend dependencies (our pinned version of MDBX is currently not compiling on FreeBSD with certain compiler versions). ## Additional Info When I opened this PR we were using resolver v1 which [doesn't disable default features in dependencies](https://doc.rust-lang.org/cargo/reference/features.html#resolver-version-2-command-line-flags), and `mdbx` is default for the `slasher` crate. Even after the resolver got changed to v2 in #3697 compiling with `--no-default-features` _still_ wasn't turning off the slasher crate's default features, so I added `default-features = false` in all the places we depend on it. Co-authored-by: Michael Sproul <micsproul@gmail.com>
This commit is contained in:
@@ -133,6 +133,15 @@ Commonly used features include:
|
||||
* `slasher-lmdb`: support for the LMDB slasher backend.
|
||||
* `jemalloc`: use [`jemalloc`][jemalloc] to allocate memory. Enabled by default on Linux and macOS.
|
||||
Not supported on Windows.
|
||||
* `spec-minimal`: support for the minimal preset (useful for testing).
|
||||
|
||||
Default features (e.g. `slasher-mdbx`) may be opted out of using the `--no-default-features`
|
||||
argument for `cargo`, which can plumbed in via the `CARGO_INSTALL_EXTRA_FLAGS` environment variable.
|
||||
E.g.
|
||||
|
||||
```
|
||||
CARGO_INSTALL_EXTRA_FLAGS="--no-default-features" make
|
||||
```
|
||||
|
||||
[jemalloc]: https://jemalloc.net/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user