diff --git a/README.md b/README.md index a264851..dcc610c 100644 --- a/README.md +++ b/README.md @@ -61,3 +61,14 @@ for compatibility. If you need to modify column families concurrently, enable the crate feature `multi-threaded-cf`, which makes this binding's data structures use `RwLock` by default. Alternatively, you can directly create `DBWithThreadMode` without enabling the crate feature. + +## Portable builds + +RocksDB's build, unlike Cargo, will default to setting `-march=native`, which +generate code that fully takes advantage of build machine's CPU's features. +This may create a binary that isn't compatible with other CPUs on the same +architecture. For example, building on a machine with AVX512 support will create +a binary that fails with `SIGILL` on machines without AVX512. + +Set the `portable` feature on this crate to pass `PORTABLE=1` to RocksDB's build, +which will create a portable binary at the cost of some performance.