Repository navigation
v0.2.5
GrayNFS v0.2.5
0.x carries no compatibility promise.
Highlights
- WebAssembly target:
crates/graynfs-wasmbuilds the engine forwasm32-unknown-unknownwith wasm-bindgen and exposesfactorize(decimal, budgetMs)andversion()to JavaScript. Every call returns JSON (ok/input/factors/factorConfidence/method/degree/polynomial/root/relations/rank/elapsedMs/stages, orok/input/error) and never throws; the wasm build runs single-threaded with a 1000-10000 ms budget, a 512 MiB memory budget and a fixed seed. - Portability seams in the core:
crates/graynfs-core/src/time.rsroutes every productionInstantthrough ajs_sys::Datebackend on wasm and re-exportsstd::time::Instanton native targets;crates/graynfs-core/src/par.rsreports one worker on wasm, and all nine productionthread::scopesites gained a sequential wasm branch with the native block byte-identical. - Version-marking release 0.2.4 to 0.2.5; no factorization-logic change on native targets.
Breaking changes
- None for the native Rust, Python or CLI surface:
FactorReport, CLI JSON and the Python dicts are untouched, and every native parallel path is unchanged. - Additive: the workspace gains the
crates/graynfs-wasmmember, a root.cargo/config.tomlcarrying thegetrandom_backend="wasm_js"cfg forwasm32-unknown-unknown, andcrates/graynfs-wasm/pkg/is git-ignored build output.
What's changed
- Clock seam:
time.rswith a native re-export and a wasmInstant(now,elapsed,duration_since,saturating_duration_since,checked_add,checked_sub, total order,Add/Sub); eleven core modules plusprime.rs'sfor_each_primenow usecrate::time::Instant. - Single-thread parity:
par.rsavailable_workers(); five worker-count sites routed through it; sequential wasm branches atcascade.rs(ECM then SIQS),ecm.rs(two curve batches),general.rs(dependency scan and b-scan),linear_algebra.rs(candidate chunks),relations.rs(range collection with the same CPU/memory/progress accounting) andsiqs.rs(two polynomial rounds). - wasm surface:
factorize/version, aconsole_error_panic_hookstart hook,serde_json-only payload building, the budget clamp, andscripts/wasm-smoke.mjs(Node ESM, raw-byte init) covering10403,600851475143and a 105-bit budget-limited input. - Docs: README
## WebAssemblysection with the build command, the JSON contract and the single-thread limits. - Known limitation, disclosed: the wasm joint stage runs ECM before SIQS, so ECM may consume the deadline that the native race would have shared.
Benchmarks
- Native CI smoke gate (release, 16 threads, medians of 5, binary
35C614D2, 2026-11-10): OVERALL PASS 4/4, all 5/5 product-verified - bit100-deg2 siqs 1878/945 med 173.0 (limit 322.5), bit100-default ecm med 95.0 (limit 197.5), hostile105-deg2 siqs 1177/926 med 621.0 (limit 4290.0), deg3skip-deg2 siqs 240/145 med 14.0 (limit 45.0). - WASM smoke: 3/3 PASS, artifact 888,130 bytes;
10403to101, 103,600851475143to71, 839, 1471, 6857, and the 105-bit corpus input at a 1000 ms budget ends inresource limit exceeded. - Full gates on the tagged tree: fmt clean, clippy
-D warningsclean,cargo test --workspace383 passed / 0 failed, pytest 52 passed on the attached wheel,check_version8/8,check_api_surface14/14,check_invariants32/32. - Standing pins held exact: 1878/945, 1177/926, 240/145. One pre-existing wall-clock test (
ecm_burn_bound_reports_numeric_cap) is load-sensitive; a HEAD control tree reproduces the same intermittent failure and no wasm hunk touches its path.
Full Changelog: v0.2.4...v0.2.5