Every number on the verification page comes from these exact commands. Clone the repo, run each step in order, and compare your output to what's shown here.
Requires Rust (stable) and Python 3.9+. No other setup.
git clone https://github.com/codewitharyan29/Port-Mortem.git
cd Port-Mortem
cargo build --release
git clone https://github.com/codewitharyan29/Port-Mortem.git
cd Port-Mortem
cargo build --release
Finished `release` profile [optimized] target(s) — zero warnings.Confirm it's really Rust doing the sorting, not a shim.
"file10`nfile2`nfile1" | .\target\release\natsort_port.exe sort
.\target\release\natsort_port.exe key "a-5.034e2"
printf 'file10\nfile2\nfile1\n' | ./target/release/natsort_port sort
./target/release/natsort_port key "a-5.034e2"
file1 file2 file10 then T:a- I:5 T:. I:34 T:e I:2Unit tests, property tests (proptest), and CLI contract tests.
cargo test --release
test result: ok. 44 passed; 0 failedThe headline proof: natsort's original test files, byte-identical to upstream (sha256-verified), run against the Rust binary via a thin adapter.
py -m pip install pytest hypothesis
$env:PYTHONPATH="adapter"
py -m pytest -q
pip install pytest hypothesis
PYTHONPATH=adapter python3 -m pytest -q
33 passed, 30 deselectedpytest.ini and the root conftest.py — never edited silently.
Verify the test files themselves are untouched: sha256sum -c evidence/original_tests.sha256
from inside tests/original/.Random inputs across the full Unicode character set, compared against the live Python library.
py fuzz\harness.py 3000python3 fuzz/harness.py 3000TOTAL DIVERGENCES: 0 (21,000 comparisons, 7 algorithms)For the continuous 60-second Fuzz Survivor run
(published log at evidence/fuzz_60s_log.txt):
py fuzz\harness_60s.py 60python3 fuzz/harness_60s.py 60RESULT: 60.0s continuous run ... TOTAL DIVERGENCES: 0Every CLI invocation compared to Python's CLI; deliberate bugs injected to confirm the test suite actually catches regressions.
py cli_difftest.py 200
py mutation_test.pypython3 cli_difftest.py 200
python3 mutation_test.py2,800 invocations, 0 divergences and MUTATION SCORE: 5/5Requires rustup (for clippy) and cargo-llvm-cov.
cargo clippy --release --all-targets -- -D warnings
cargo install cargo-llvm-cov
cargo llvm-cov --release --summary-only
src/lib.rsHonest numbers: mean, p50, p95, p99 latency and peak RSS — not just hot-loop throughput.
py bench\run.py 50000 15python3 bench/run.py 50000 15evidence/bench_results.txt for the reference run)Compiles the same Rust core to WebAssembly so it sorts live in the browser, then serves it over local HTTP.
One-time setup:
rustup target add wasm32-unknown-unknown
cargo install wasm-pack
./build-wasm.sh invokes bash,
which on Windows tries to route through WSL — if no WSL distro is installed you'll see
"Windows Subsystem for Linux has no installed distributions." and the build
silently won't run. Skip the script and run the underlying command directly instead
(works identically on every platform):wasm-pack build --target web --out-dir web/pkg --out-name natsort_core -- --features wasm
[INFO]: :-) Your wasm pkg is ready to publish at .../web/pkgThen serve — WASM does not
load over a bare file:// URL, it needs an actual HTTP server:
cd web
py -m http.server 8000cd web
python3 -m http.server 8000http://localhost:8000 in a browser
(not double-clicking index.html) — the amber "module not found" warning
disappears and Sort/Shuffle become live.Ctrl+Shift+R) — browsers sometimes cache the earlier 404 response for
pkg/natsort_core.js from before the build finished.pytest and hypothesis (natsort's own conftest imports hypothesis).natsort_port.exe; all Python helpers detect this automatically. Use py, not python3.cargo-llvm-cov needs the llvm-tools-preview rustup component (installed on first run, ~40MB).wasm-pack + wasm32-unknown-unknown target. See Step 09 above (on Windows, skip build-wasm.sh — it needs WSL; run the wasm-pack build command directly instead).vendor/.