md5

A small, dependency-free Rust implementation of the MD5 hash function

Library
Cargo
v0.8.1
86stars
Apache-2.0 OR MIT

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
50/100Fair
Development Activity56
Maintenance28
Community44
Maturity60
Momentum12

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
72/100Good
Architecture72
Code Quality80
Innovation45
Learning Curve92

md5 is a compact, single-file Rust crate implementing the MD5 message-digest algorithm as specified in RFC 1321. It exposes a simple md5::compute(bytes) -> Digest function along with an incremental Context API for hashing data in chunks, and supports no_std environments via a std feature flag.

The crate’s own documentation is explicit that MD5 is cryptographically broken and should only be used for interoperability with legacy protocols or systems that mandate it — not for any new security-sensitive design. It remains widely used for non-cryptographic purposes such as checksums, cache keys, and content fingerprinting where collision resistance isn’t a security requirement.

What You Get

  • A single md5::compute(bytes) -> Digest function for one-shot hashing
  • An incremental Context type for hashing data across multiple chunks/streams
  • A Digest type implementing Debug/LowerHex/Deref<Target = [u8; 16]> for easy formatting and byte access
  • no_std compatibility via an optional std feature (enabled by default)
  • Zero external runtime dependencies

Common Use Cases

  • Interoperating with legacy protocols or file formats (e.g. certain checksums, ETags, or hash-based cache keys) that mandate MD5
  • Computing non-cryptographic content fingerprints for deduplication or cache invalidation
  • Generating checksums for data integrity checks where collision resistance against an adversary isn’t required
  • Embedded or no_std contexts needing a minimal-footprint hash function without pulling in a larger crypto crate

Under The Hood

Architecture The entire implementation lives in a single 446-line src/lib.rs: a Digest([u8; 16]) newtype wraps the raw hash output with Debug/LowerHex/Deref implementations for ergonomic formatting, a Context struct implements the RFC 1321 MD5 compression function incrementally over 64-byte blocks, and the top-level compute() function is a thin convenience wrapper that feeds all input through a single Context and finalizes it.

Tech Stack Pure Rust with zero runtime dependencies, structured to support both std and no_std builds via a #[cfg_attr(not(feature = "std"), no_std)] attribute and a small compatibility shim (use std as core when the std feature is enabled). A benches/ directory provides Criterion-style benchmarks for measuring hashing throughput.

Code Quality The crate includes doctest examples embedded directly in the module-level documentation (verified at cargo test time) plus dedicated unit tests exercising the RFC 1321 test vectors and edge cases like empty input and multi-chunk incremental hashing. The single-file structure keeps the implementation easy to audit end-to-end, and the module doc comment prominently and responsibly warns that MD5 is cryptographically broken before showing any usage example.

API Design The one-shot md5::compute() function requires no setup for the common case, while Context provides the same functionality incrementally for streaming data too large to buffer in memory at once — a minimal two-tier API that mirrors common patterns from other Rust hash crates (like sha2), making it immediately familiar to anyone who has used a hashing crate in Rust before.

Used by 8 apps in this directory

Dart
74%
AGPL 3.0

AppFlowy

Productivity · Project Management · Collaboration

75,729

The open-source AI workspace that puts your data, your rules — with local LLMs, CRDT collaboration, and full self-hosting built in.

View details
66
Repo Health
81
Technical
66
Dependency
Built with
Dart74%
Rust24%
Updated 1 weeks ago
TypeScript
55%
Other

Cap

Team Chat · Video Conferencing

20,986

Open source Loom alternative with GPU-accelerated recording, instant share links, AI summaries, and full self-hosting via Docker Compose.

View details
89
Repo Health
81
Technical
65
Dependency
Built with
TypeScript55%
Rust40%
Updated yesterday
TypeScript
61%
EPL-2.0

Huly Platform

Project Management · Team Chat · Collaboration

27,384

Open-source all-in-one workspace that replaces Linear, Jira, Slack, and Notion for product and engineering teams.

View details
90
Repo Health
86
Technical
64
Dependency
Built with
TypeScript61%
Svelte34%
Updated 1 weeks ago
Rust
100%
Other

Meilisearch

Search

59,012

Lightning-fast hybrid search engine with AI-powered semantic and full-text retrieval for modern applications.

View details
90
Repo Health
88
Technical
68
Dependency
Built with
Rust100%
Updated 5 days ago
Rust
63%
MIT

PostgresML

Databases · AI Development

6,817

Run ML training and LLM inference natively inside PostgreSQL with GPU acceleration — no data movement required.

View details
51
Repo Health
76
Technical
65
Dependency
Built with
Rust63%
JavaScript11%
Updated 1 years ago
Python
55%
Other

PostHog

Analytics · Monitoring · Developer Tools

37,777

The all-in-one open source product platform combining analytics, session replay, feature flags, error tracking, AI observability, and a built-in data warehouse in a single self-hostable stack.

View details
92
Repo Health
80
Technical
67
Dependency
Built with
Python55%
TypeScript36%
Updated today
Rust
68%
AGPL 3.0

RustDesk

Networking

121,233

Open-source, self-hosted remote desktop built in Rust — your data, your infrastructure, no third-party cloud.

View details
93
Repo Health
84
Technical
75
Dependency
Built with
Rust68%
Dart24%
Updated today
Rust
98%

Stalwart

Collaboration

14,255

All-in-one secure mail and collaboration server covering IMAP, JMAP, SMTP, CalDAV, CardDAV, and WebDAV in a single memory-safe Rust binary.

View details
89
Repo Health
81
Technical
68
Dependency
Built with
Rust98%
Updated yesterday

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search