summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSujay Jayakar <sujayakar@convex.dev>2024-03-15 11:05:01 -0400
committerZaidoon Abd Al Hadi <43054535+zaidoon1@users.noreply.github.com>2024-03-15 12:41:00 -0400
commit0d8804a5d668989fc450205e990204bf72427650 (patch)
tree989b70503d8d50df473846912876acf07269af5b
parenteeab5d83250c4aaa8bfc3a17b15f9bf67b77b6cc (diff)
Update README.md with a new section for the portable feature
-rw-r--r--README.md11
1 files changed, 11 insertions, 0 deletions
diff --git a/README.md b/README.md
index 1b70ac3..45f4bce 100644
--- a/README.md
+++ b/README.md
@@ -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.