Copy the code, keep the proof.
Small, verified Rust parts for AI data processing and security. Copy the source into your project, or use them from Python.
Verification
Matches scipy.stats.entropy
4,000/ 4,000 cases
Property-based testingPython · scipy.stats.entropy 1.14
Shelves
Parts are grouped by what they are for.
Benchmarks
Up to 35× faster
kura-rs (Rust)scipy.stats.entropy
How kura-rs works
- 1Copy the code
Rust parts are plain source files.
kura add <name>copies them into your project, and from then on they are yours to read and change. - 2Or install for Python
The same parts are built with PyO3 and published as one package, kura-rs.
- 3Keep the proof
Each part lists the reference it was tested against, how many cases passed, and where it gets faster than the reference.
Install
Byte Entropy
cargo install kura-rs
kura add byte-entropyUsage
use crate::parts::byte_entropy::windows;
for w in windows(&binary, 4096) {
if w.entropy > 7.2 {
println!("offset {:#x}: likely packed ({:.2} bits/byte)", w.offset, w.entropy);
}
}