Skip to content

Commit

Permalink
Update README.md with a new section for the portable feature
Browse files Browse the repository at this point in the history
  • Loading branch information
sujayakar authored and zaidoon1 committed Mar 15, 2024
1 parent 60714d1 commit 7179b8b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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<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.

0 comments on commit 7179b8b

Please sign in to comment.