An O(sqrt(n))-time implementation of Eratosthenes' sieve in Rust, with an additional implementation using segmented sieving to ensure O(sqrt(n)) memory usage.
I also wrote a Ruby version.
cargo run --example simple_eratosthenes
cargo test
for different unit/documentation testscargo doc --open
Shepmaster on Stack Overflow was beyond helpful in code review and in learning how to handle borrowing in parallel threads.
A list of other references I consulted along the way: