Fast and robust atproto CAR file processing in rust

put hashbrown behind a feature flag

its default hash function isn't DOS-resistant, and we need to be robust by default

+9 -1
+5 -1
Cargo.toml
··· 8 8 9 9 [dependencies] 10 10 fjall = { version = "3.0.1", default-features = false } 11 - hashbrown = "0.16.1" 11 + hashbrown = { version = "0.16.1", optional = true } 12 12 cid = { version = "0.11.1", features = ["serde"] } 13 13 iroh-car = "0.5.1" 14 14 log = "0.4.28" ··· 18 18 sha2 = "0.10.9" # note: hmac-sha256 is simpler, smaller, benches ~15ns slower 19 19 thiserror = "2.0.17" 20 20 tokio = { version = "1.47.1", features = ["rt", "sync"] } 21 + 22 + [features] 23 + default = [] 24 + hashbrown = ["dep:hashbrown"] 21 25 22 26 [dev-dependencies] 23 27 clap = { version = "4.5.48", features = ["derive"] }
+4
src/lib.rs
··· 94 94 95 95 pub type Rkey = String; 96 96 97 + #[cfg(feature = "hashbrown")] 97 98 pub(crate) use hashbrown::HashMap; 99 + 100 + #[cfg(not(feature = "hashbrown"))] 101 + pub(crate) use std::collections::HashMap; 98 102 99 103 #[doc = include_str!("../readme.md")] 100 104 #[cfg(doctest)]