From: Matt Corallo Date: Thu, 1 Aug 2024 21:32:47 +0000 (+0000) Subject: Add a feature to slow things down for a smaller binary X-Git-Tag: v0.6.5~4 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=b7c1896f4d6a49bb3b30f589e511642c74066301;p=dnssec-prover Add a feature to slow things down for a smaller binary --- diff --git a/Cargo.toml b/Cargo.toml index f4c1423..e3dcc76 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,6 +19,7 @@ std = [] validation = ["bitcoin_hashes", "hex_lit"] tokio = ["tokio_crate/net", "tokio_crate/io-util", "std"] build_server = ["tokio", "tokio_crate/rt-multi-thread", "tokio_crate/macros"] +slower_smaller_binary = [] [dependencies] bitcoin_hashes = { version = "0.14", default-features = false, optional = true } diff --git a/README b/README index c2b5f72..0d5746a 100644 --- a/README +++ b/README @@ -21,6 +21,10 @@ There are numerous APIs present: `/dnssecproof?d=domain&t=rr_type`, returning the binary proof containing and proving the Resource Record of type `rr_type` at `domain`. +The `slower_smaller_binary` feature slows proof validation down by 50%+ for a +very marginal reduction in binary size, but those who are extremely binary size +constrained may still find it useful. + See https://docs.rs/dnssec-prover for full API details on the Rust API. There's also a website which demonstrates the WASM build of this crate at https://http-dns-prover.as397444.net/ which allows for making validated queries. diff --git a/src/lib.rs b/src/lib.rs index 5a8f33c..f08034f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -24,6 +24,10 @@ //! * Finally, the crate can be built as a binary using the `build_server` feature, responding to //! queries over HTTP GET calls to `/dnssecproof?d=domain.name.&t=RecordType` with DNSSEC //! proofs. +//! +//! The `slower_smaller_binary` feature slows proof validation down by 50%+ for a very marginal +//! reduction in binary size, but those who are extremely binary size constrained may still find it +//! useful. #![deny(missing_docs)] #![deny(rustdoc::broken_intra_doc_links)] diff --git a/test.sh b/test.sh index 2a1ed1f..b0877fd 100755 --- a/test.sh +++ b/test.sh @@ -7,6 +7,7 @@ cargo $RUST_VERSION test --no-default-features --features std cargo $RUST_VERSION test --no-default-features --features tokio cargo $RUST_VERSION test --no-default-features --features validation cargo $RUST_VERSION test --features std,tokio,validation +cargo $RUST_VERSION test --features std,tokio,validation,slower_smaller_binary cargo $RUST_VERSION test --no-default-features --features build_server cargo $RUST_VERSION build --lib cargo $RUST_VERSION build --lib --features std diff --git a/validation_bloat_test/Cargo.toml b/validation_bloat_test/Cargo.toml index 1b23fb4..530d08a 100644 --- a/validation_bloat_test/Cargo.toml +++ b/validation_bloat_test/Cargo.toml @@ -4,4 +4,4 @@ version = "0.1.0" edition = "2021" [dependencies] -dnssec-prover = { path = "../", default-features = false, features = ["validation"] } +dnssec-prover = { path = "../", default-features = false, features = ["validation", "slower_smaller_binary"] }