use-prime
Install
[]
= "0.0.5"
What belongs here
use-prime owns practical prime-number utilities: primality checks, next and
previous prime search, sieve generation, and deterministic prime factorization
over primitive unsigned integers.
This crate is intended for practical number-theory helpers, not cryptographic prime generation. It keeps the first release explicit, dependency-free, and predictable.
Neighboring crates
| Crate | Responsibility |
|---|---|
use-prime |
Primality checks, prime search, sieves, and factorization |
use-modular |
Modular arithmetic, congruence, inverses, and exponentiation |
use-arithmetic |
GCD, LCM, divisibility, parity, and arithmetic helpers |
use-integer |
Integer classification and integer-specific descriptive helpers |
use-number |
Broader number abstractions and shared numeric vocabulary |
use-combinatorics |
Counting helpers that may consume prime utilities |
use-algebra |
Algebraic structures and law checking over caller-supplied ops |
use-cryptography |
Future cryptographic protocols and stronger prime requirements |
use-prime intentionally does not define modular arithmetic,
probabilistic primality tests, cryptographic-strength prime generation, or
arbitrary-precision integer support.
Examples
Primality and neighboring primes
use ;
assert!;
assert_eq!;
assert_eq!;
Prime factors and multiplicities
use ;
assert_eq!;
assert_eq!;
assert_eq!;
Sieve-backed prime generation
use primes_up_to;
assert_eq!;
Status
use-prime is a concrete pre-1.0 crate in the RustUse math workspace. The
API stays small and deterministic so adjacent number, integer, arithmetic,
modular, combinatorics, algebra, and future cryptography crates can share one
focused prime-utility surface.