Skip to main content

strsimpy-rust (Rust mirror of luozhouyang/python-string-similarity)

Stage-1 Rust mirror of luozhouyang/python-string-similarity (MIT, original by ZhouYang Luo). Behavior-identical port of the strsimpy package exposed as the strsimpy._strsimpy extension module via PyO3, with a thin strsimpy/__init__.py re-export shim preserving the original public API (Levenshtein, Damerau, JaroWinkler, Cosine, SIFT4, ...).

Layout (publishable)

One implementation, two distributions:

  • strsimpy-core/ — reusable pure-Rust core crate strsimpy-rust-core (crates.io). No Python dependency: rlib, cargo test clean, miri-clean. Rust consumers depend on this crate directly.
  • src/lib.rs — thin PyO3 binding crate strsimpy-rust calling that same core. Ships on PyPI as distribution strsimpy-rust; the import name is unchanged (import strsimpy), so users swap the install with zero code changes: pip install strsimpy-rust instead of pip install strsimpy.
  • strsimpy/ — Python shim (__init__.py).
  • release.toml — release configuration (names, version, platforms, Python versions, publishing repo + workflow identity, license, upstream attribution). Read by rustsmith release-prep; see docs/RELEASE.md.

No redesign: every algorithm replicates the original op-for-op over chars (never bytes) with identical accumulation order, so float outputs are bit-exact.

Install

pip install strsimpy-rust        # Python (import strsimpy)
cargo add strsimpy-rust-core     # Rust

Release

Publishing is a manual step after review; rustsmith never pushes. Prepare and verify everything locally, then follow the generated setup instructions:

rustsmith release-prep --project mirror/strsimpy --fork <fork> --opt <opt> \
  --recon-out <recon> --out <dist>

See docs/RELEASE.md (releasing converted projects) and the generated TRUSTED_PUBLISHING_SETUP.md in the output directory.

Measured performance

No accepted optimizations yet (mirror baseline); re-run release-prep after run --stage optimize merges winners. Artifact hashes are intentionally absent here; see release-manifest.json.

Metadata

Release files for strsimpy-rust 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for strsimpy-rust 0.2.1
File Size Uploaded
strsimpy_rust-0.2.1.tar.gz 19.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for strsimpy-rust 0.2.1
File Interpreter ABI Platform
strsimpy_rust-0.2.1-cp312-cp312-manylinux_2_34_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.34+ x86-64 Details

Total release size: 378.0 kB

Release files / strsimpy_rust-0.2.1.tar.gz

Download URL strsimpy_rust-0.2.1.tar.gz
Size 19.9 kB
Tags Source
SHA-256 checksum
How to use checksums
76b612652f237560f592a5e0dc5b38fe8a36b438fbc655ba62deb72c67ff7ca5
BLAKE2b-256 checksum
How to use checksums
6e256e64846dcee103e0e03447448a8836c914ff6a9f1efd4fddc25a0c95107f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.2

Release files / strsimpy_rust-0.2.1-cp312-cp312-manylinux_2_34_x86_64.whl

Download URL strsimpy_rust-0.2.1-cp312-cp312-manylinux_2_34_x86_64.whl
Size 358.1 kB
Tags CPython 3.12 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
b9377abccd4e9a07f2360921c3b12dc796b100dda3ce75f082df1223523b83c5
BLAKE2b-256 checksum
How to use checksums
60dde7130449736ba290bac921665345f5e2cf3aab9f3390a721d27d75eddc0b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.2

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page