Skip to content

Commit

Permalink
use Cargo.toml to demonstrate bindgen-static
Browse files Browse the repository at this point in the history
  • Loading branch information
Congyuwang committed Nov 4, 2024
1 parent a911377 commit 4cbd92f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,12 @@ links to libclang. This is suitable for most platforms, and is enabled by defaul

The feature `bindgen-static` will enable the `static` feature of bindgen, which statically
links to libclang. This is suitable for musllinux platforms, such as Alpine linux.
To build on Alpine linux for example, build with
`--no-default-features --features bindgen-static,other-features-1,other-features-2`.
To build on Alpine linux for example, make these changes to your Cargo.toml:

```toml
[dependencies.rocksdb]
default-features = false
features = ["bindgen-static", "snappy", "lz4", "zstd", "zlib", "bzip2"]
```

Notice that `runtime` and `static` features are mutually exclusive, and won't compile if both enabled.

0 comments on commit 4cbd92f

Please sign in to comment.