From 4cbd92fa9edc2c0156f10c0a0acd362fbb97f8ed Mon Sep 17 00:00:00 2001 From: Congyu WANG Date: Mon, 4 Nov 2024 13:51:17 +0800 Subject: [PATCH] use Cargo.toml to demonstrate bindgen-static --- README.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 51c8e2148..fc8e0e888 100644 --- a/README.md +++ b/README.md @@ -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.