z3.rs
z3.rs copied to clipboard
Strongly typed bitvector-lengths
Now that const generics are stable, we could have a pub struct BV<'ctx, const N: usize>
.
This would prevent any mix ups when you have multiple sizes of bitvector floating around. I don't have time to put together a PR for this atm, but it would be really neat and I think not too difficult.
If anyone decides to implement this please make sure that the ability to have bitvectors with sizes not known at compile time is not lost. I think this means that two versions of BV may be needed? I'm not entirely sure as I am not very familiar with Rust const generics.