Metadata-Version: 2.4
Name: fast-mdurl-rs
Version: 0.1.0
Classifier: Development Status :: 3 - Alpha
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Rust
Classifier: Typing :: Typed
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Internet :: WWW/HTTP
License-File: LICENSE
Summary: Opt-in Rust-backed API replacement for mdurl
Keywords: mdurl,url,markdown,pyo3,rust,performance
Author: fast-mdurl-rs contributors
License-Expression: MIT
Requires-Python: >=3.9
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Changelog, https://github.com/lowmiaq-gmail/fast-mdurl-rs/blob/main/CHANGELOG.md
Project-URL: Homepage, https://github.com/lowmiaq-gmail/fast-mdurl-rs
Project-URL: Issues, https://github.com/lowmiaq-gmail/fast-mdurl-rs/issues
Project-URL: Repository, https://github.com/lowmiaq-gmail/fast-mdurl-rs

# fast-mdurl-rs

Opt-in Rust-backed, behavior-compatible replacement for `mdurl==0.1.2`. It
keeps the same `mdurl` import, public functions and `URL` `NamedTuple` while
accelerating encode, decode and parse hot paths.

The frozen contract, reuse decision and evidence are in `UPSTREAM-CONTRACT.md`,
`REUSE-AUDIT.md`, `COMPATIBILITY.md`, and `FULL-RELEASE-REPORT.md`. Release
claims remain acceptance-gated: a source checkout or successful build alone is
not evidence of a public PyPI release.

Latest exact-wheel evidence on macOS arm64: the complete upstream and candidate
suites pass, a deterministic 10,000-case oracle differential has zero
mismatches, and encode/decode/parse each outperform the frozen Python oracle.
Exact raw samples, medians and p95 are in `benchmark.json` and
`COMPATIBILITY.md`.
The trivial Python formatter remains Python because the first Rust crossing
measured only 0.63x; removing it is part of the design, not an omitted feature.

Real-consumer validation against `markdown-it-py==4.2.0` passed its complete
`981`-test suite. Interleaved end-to-end measurements show a modest benefit on
link-dense Markdown, while a real README and a no-link control show no consistent
gain. Exact raw samples, medians, artifact hash and environment are generated
after the immutable wheel in external `consumer-benchmark.json`; they are
workload-specific evidence, not a blanket speed claim.

## Installation limitation

The distribution is named `fast-mdurl-rs`, while consumers declare a dependency
on the separate `mdurl` distribution. Python package resolvers do not treat one
distribution as satisfying the other even though both provide the `mdurl`
namespace. Therefore this is an API/import drop-in, not a resolver-transparent
replacement. It supports Python `>=3.9`; the frozen upstream also supports 3.7
and 3.8, which are outside this package's compatibility range. A controlled
opt-in install on Python 3.9+ is:

```bash
python -m pip install markdown-it-py
python -m pip uninstall -y mdurl
python -m pip install fast-mdurl-rs
python -c "from markdown_it import MarkdownIt; print(MarkdownIt().render('[x](https://example.com)'))"
```

`pip check` will still report that `markdown-it-py` requires `mdurl`; do not
install both distributions together because they own the same import namespace.
Rollback with `python -m pip uninstall -y fast-mdurl-rs && python -m pip install
'mdurl~=0.1'`. The lowest-friction ecosystem path is an optional backend accepted
by upstream `mdurl`/`markdown-it-py`; no such upstream acceptance is claimed yet.

Local development:

```bash
uv venv
uv pip install maturin pytest pytest-randomly pytest-cov
uv run maturin develop
uv run pytest -q
```

## Verification and release assets

- Complete frozen upstream and candidate suites plus a deterministic 10,000-case differential.
- Five-platform abi3 release-wheel matrix, sdist rebuild, artifact metadata/RECORD audit, and public reinstall gates.
- Exact-artifact benchmark evidence attached to the formal GitHub Release created last.
- Truthful limitations and workload-specific results in `COMPATIBILITY.md` and `BENCHMARK.md`.

## License

MIT. The frozen upstream implementation is also MIT; attribution and dependency
license metadata are retained in `THIRD_PARTY_NOTICES.md`.

