Registry / utility / primes

primes

JSON →
library0.4.0rscratesunverified

A package for calculating primes using the Sieve of Eratosthenes, checking primality, and factoring numbers, including an iterator over all primes.

# Cargo.toml [dependencies] primes = "0.4.0"
INSTALL
IMPORT
SIG · PRIMES
P
primes
utilityrustv0.4.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Sieve
use primes::Sieve;

Create a Sieve and iterate over the first 10 primes.

use primes::Sieve; let mut sieve = Sieve::new(); println!("First 10 primes: {:?}", sieve.iter().take(10).collect::<Vec<_>>());
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.4.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
8 hits · last 30 days
node
8
Resources
primes — cargo add primes · libregistry