What changed, and why it matters
This commit creates a brand-new, empty placeholder crate named `bitcoin-bip158` inside the rust-bitcoin workspace. It adds no executable code, no network functionality, no cryptographic operations, and no changes to existing crates. It is purely a project-structure refactor in preparation for later moving BIP-158 filter code out of the main `bitcoin` crate.
No security action required. Treat as normal repository maintenance / crate split preparation.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change adds a new workspace member bip158/ with standard crate scaffolding: Cargo.toml, README.md, CHANGELOG.md, two contrib/ shell scripts, and an empty src/lib.rs containing only crate-level attributes and documentation comments. The workspace Cargo.toml and both lockfiles are updated to include the new member. No source code from the existing BIP-158 module is moved or modified, and no other crate depends on bitcoin-bip158 yet.
Changed components
workspace `Cargo.toml``Cargo-minimal.lock``Cargo-recent.lock`new `bip158/` crate scaffoldingInspect captured patch +83 / −1
diff --git a/Cargo-minimal.lock b/Cargo-minimal.lock
index 138249c7..2f594510 100644
--- a/Cargo-minimal.lock
+++ b/Cargo-minimal.lock
@@ -72,6 +72,10 @@ dependencies = [
name = "bitcoin-addresses"
version = "0.0.0"
+[[package]]
+name = "bitcoin-bip158"
+version = "0.0.0"
+
[[package]]
name = "bitcoin-consensus-encoding"
version = "1.0.0-rc.2"
diff --git a/Cargo-recent.lock b/Cargo-recent.lock
index 1b5e0f73..d13d243e 100644
--- a/Cargo-recent.lock
+++ b/Cargo-recent.lock
@@ -71,6 +71,10 @@ dependencies = [
name = "bitcoin-addresses"
version = "0.0.0"
+[[package]]
+name = "bitcoin-bip158"
+version = "0.0.0"
+
[[package]]
name = "bitcoin-consensus-encoding"
version = "1.0.0-rc.2"
diff --git a/Cargo.toml b/Cargo.toml
index 170d4118..336e2eab 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,4 +1,4 @@
[workspace]
-members = ["addresses", "base58", "bitcoin", "chacha20_poly1305", "consensus_encoding", "crypto", "fuzz", "hashes", "internals", "io", "p2p", "primitives", "units"]
+members = ["addresses", "base58", "bip158", "bitcoin", "chacha20_poly1305", "consensus_encoding", "crypto", "fuzz", "hashes", "internals", "io", "p2p", "primitives", "units"]
exclude = ["benches"]
resolver = "2"
diff --git a/bip158/CHANGELOG.md b/bip158/CHANGELOG.md
new file mode 100644
index 00000000..bf34213b
--- /dev/null
+++ b/bip158/CHANGELOG.md
@@ -0,0 +1,3 @@
+# 0.1.0 - 2025-12-09
+
+* Initial release of the `github.com/rust-bitcoin/rust-bitcoin/bip158` crate as `bip158`.
diff --git a/bip158/Cargo.toml b/bip158/Cargo.toml
new file mode 100644
index 00000000..b0ac9c2c
--- /dev/null
+++ b/bip158/Cargo.toml
@@ -0,0 +1,25 @@
+[package]
+name = "bitcoin-bip158"
+version = "0.0.0"
+authors = ["Andrew Poelstra <apoelstra@wpsoftware.net>"]
+license = "CC0-1.0"
+repository = "https://github.com/rust-bitcoin/rust-bitcoin"
+description = "Golomb-rice coded filters for set membership query."
+categories = ["cryptography::cryptocurrencies"]
+keywords = ["bitcoin", "peer-to-peer", "cryptography"]
+readme = "README.md"
+edition = "2021"
+rust-version = "1.74.0"
+exclude = ["tests", "contrib"]
+
+[dependencies]
+
+[dev-dependencies]
+
+[package.metadata.docs.rs]
+all-features = true
+rustdoc-args = ["--cfg", "docsrs"]
+
+[lints.clippy]
+redundant_clone = "warn"
+use_self = "warn"
diff --git a/bip158/README.md b/bip158/README.md
new file mode 100644
index 00000000..cf4e3674
--- /dev/null
+++ b/bip158/README.md
@@ -0,0 +1,12 @@
+# BIP-158
+
+Implementation of [BIP-158](https://github.com/bitcoin/bips/blob/master/bip-0158.mediawiki) golomb coded block filters for private light client set membership query.
+
+## Minimum Supported Rust Version (MSRV)
+
+This library should always compile with any combination of features on **Rust 1.74.0**.
+
+## Licensing
+
+The code in this project is licensed under the [Creative Commons CC0 1.0 Universal license](LICENSE).
+We use the [SPDX license list](https://spdx.org/licenses/) and [SPDX IDs](https://spdx.dev/ids/).
diff --git a/bip158/contrib/extra_lints.sh b/bip158/contrib/extra_lints.sh
new file mode 100755
index 00000000..5e7f0c94
--- /dev/null
+++ b/bip158/contrib/extra_lints.sh
@@ -0,0 +1,4 @@
+# No shebang, this file should not be executed.
+# shellcheck disable=SC2148
+
+cargo clippy --all-targets --no-default-features --keep-going -- -D warnings
diff --git a/bip158/contrib/test_vars.sh b/bip158/contrib/test_vars.sh
new file mode 100644
index 00000000..88e2d26e
--- /dev/null
+++ b/bip158/contrib/test_vars.sh
@@ -0,0 +1,14 @@
+# No shebang, this file should not be executed.
+# shellcheck disable=SC2148
+#
+# disable verify unused vars, despite the fact that they are used when sourced
+# shellcheck disable=SC2034
+
+# Test all these features with "std" enabled.
+FEATURES_WITH_STD=""
+
+# Test all these features without "std" enabled.
+FEATURES_WITHOUT_STD=""
+
+# Run these examples.
+EXAMPLES=""
diff --git a/bip158/src/lib.rs b/bip158/src/lib.rs
new file mode 100644
index 00000000..fb22c034
--- /dev/null
+++ b/bip158/src/lib.rs
@@ -0,0 +1,16 @@
+// SPDX-License-Identifier: CC0-1.0
+
+//! # Rust Bitcoin BIP-158 implementation.
+
+// Experimental features we need.
+#![cfg_attr(docsrs, feature(doc_auto_cfg))]
+// Coding conventions.
+#![warn(missing_docs)]
+#![warn(deprecated_in_future)]
+#![doc(test(attr(warn(unused))))]
+// Pedantic lints that we enforce.
+#![warn(clippy::return_self_not_must_use)]
+// Exclude lints we don't think are valuable.
+#![allow(clippy::needless_question_mark)] // https://github.com/rust-bitcoin/rust-bitcoin/pull/2134
+#![allow(clippy::manual_range_contains)] // More readable than clippy's format.
+#![allow(clippy::uninlined_format_args)] // Allow `format!("{}", x)`instead of enforcing `format!("{x}")`
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.