Closed nelson137 closed 5 months ago
This sounds alright to me, I think being able to compile with all features might be helpful to catch issues. @zicklag any thoughts / concerns?
I wish there was a cleaner way of exposing this constant to crate user instead of feature flags, but I couldn't think of anything (or anything that sounds better lol).
This looks good to me. 👍️ In the long term I think we're going to switch to Roaring ( compressed ) bitmaps, which can have better performance and don't need to be configured for memory usage.
@zicklag do you mind creating an issue for that work?
@nelson137 Here's an issue for the bitmap: https://github.com/fishfolk/bones/issues/363.
Fix an error cause by compiling with all features:
cargo build --all-features
.Make the conditional compilation on the
const BITSET_EXP
declarations mutually exclusive so that any combination of thekeysize*
features only ever results in a single instance.Note that the
keysize16
declaration does not exclude all other keysizes since it is the default. If multiple keysize features are enabled, including 16, then the declaration forkeysize16
will be the only one. If multiple keysize features are enabled, not including 16, then there will be no declarations, causing a compile error. This is fine since users should only enable one of these features at a time.