🚀 Faster • 🔒 Memory Safe • ⚡ Zero-Cost Abstractions • 🧪 Tested • 📦 Modular
TextDistance-RS is a Rust reimplementation of the popular TextDistance Python library, developed as part of the Code Resurrection Hackathon.
The project revives an established open-source repository by faithfully recreating its functionality in Rust, leveraging the language's performance, memory safety, and modern systems programming capabilities.
Instead of simply translating syntax, the project focuses on preserving algorithmic correctness while adopting idiomatic Rust design principles.
Our primary objective was to resurrect an existing open-source Python project into Rust while maintaining functional parity and improving maintainability.
✅ Preserve the original algorithm logic
✅ Maintain identical outputs wherever applicable
✅ Utilize Rust's ownership model for memory safety
✅ Build a clean, modular architecture
✅ Improve execution efficiency
✅ Create a scalable foundation for future enhancements
🦀 Pure Rust Implementation
⚡ High Performance Execution
🔒 Memory Safe Architecture
📦 Modular Code Organization
🧩 Easy to Extend
🧪 Unit Tested
📚 Clean Documentation
♻️ Open Source
💻 Cross Platform
🚀 Cargo Based Build System
textdistance-rs
│
├── src
│ ├── edit.rs
│ ├── lib.rs
│ ├── phonetic.rs
│ ├── sequence.rs
│ ├── simple.rs
│ ├── token.rs
│ ├── traits.rs
│ └── utils.rs
│
├── Cargo.toml
├── Cargo.lock
└── README.md
| Module | Description |
|---|---|
| 📝 edit.rs | Edit distance algorithms |
| 🔤 phonetic.rs | Phonetic similarity algorithms |
| 🔠 sequence.rs | Sequence comparison algorithms |
| 🧮 simple.rs | Basic similarity metrics |
| 🪙 token.rs | Token-based algorithms |
| 📚 traits.rs | Shared traits and abstractions |
| 🛠 utils.rs | Helper utilities |
| 📦 lib.rs | Library entry point |
git clone https://github.com/darkweb-alt/textdistance-rs.git
cd textdistance-rscargo buildcargo runcargo testEvery implemented algorithm is validated using Rust's built-in testing framework.
cargo testExample
running 24 tests
test result: ok.
📂 Analyze Original Python Repository
│
▼
📖 Study Algorithm Logic
│
▼
🦀 Reimplement in Rust
│
▼
🧪 Validate Outputs
│
▼
⚡ Optimize Structure
│
▼
📚 Document Project
| 🐍 Python | 🦀 Rust |
|---|---|
| Dynamic Typing | Static Typing |
| Interpreter Required | Native Binary |
| Garbage Collection | Ownership Model |
| Runtime Memory Checks | Compile-Time Safety |
| Moderate Performance | High Performance |
| Runtime Errors | Safer Code |
🏆 Developed for the Code Resurrection Hackathon
📦 Modular Architecture
🦀 Idiomatic Rust Codebase
📚 Readable Source Code
🧪 Comprehensive Testing
🚀 High Performance Execution
🔒 Memory Safety
♻️ Open Source
-
🚀 Complete remaining algorithms
-
📊 Performance Benchmark Suite
-
📦 Publish on crates.io
-
🌍 Unicode Optimizations
-
🔄 Continuous Integration (CI)
-
📚 API Documentation
-
⚡ SIMD Optimizations
-
🤝 Community Contributions
We welcome contributions from the community!
🍴 Fork the repository
🌿 Create a feature branch
git checkout -b feature-name💾 Commit your changes
git commit -m "Added new feature"📤 Push to GitHub
git push origin feature-name🎉 Open a Pull Request
![]() Pitambar Yadav @darkweb-alt |
![]() Venkatachalam K @Venkatachalam17 |
![]() Mrittika Srinivasan @Mrittika278 |
![]() Praveen N praveen-neshamani |
Special thanks to the creators and maintainers of the original TextDistance Python library for making their work available to the open-source community.
Their project served as the inspiration and technical foundation for this Rust implementation.
This project is released under the MIT License.
See the LICENSE file for complete details.
Made with ❤️ in Rust for the Code Resurrection Hackathon




