diff options
author | Sujay Jayakar <sujayakar@convex.dev> | 2024-03-15 11:05:01 -0400 |
---|---|---|
committer | Zaidoon Abd Al Hadi <43054535+zaidoon1@users.noreply.github.com> | 2024-03-15 12:41:00 -0400 |
commit | 0d8804a5d668989fc450205e990204bf72427650 (patch) | |
tree | 989b70503d8d50df473846912876acf07269af5b | |
parent | eeab5d83250c4aaa8bfc3a17b15f9bf67b77b6cc (diff) |
Update README.md with a new section for the portable feature
-rw-r--r-- | README.md | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -53,3 +53,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<MultiThreaded>` 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. |