md5

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

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

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
45 /100 Fair
Development Activity 40
Maintenance 24
Community 44
Maturity 60
Momentum 12

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
72 /100 Good
Architecture 72
Code Quality 80
Innovation 45
Learning Curve 92

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 9 apps in this directory

Dart
74%
AGPL 3.0

AppFlowy

AI Assistants · Collaboration · Productivity

76,967

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
67
Dependency
Built with
Dart 74%
Rust 24%
Updated 2 weeks ago
Rust
54%
Other

Cap

Team Chat · Video Conferencing

22,884

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
64
Dependency
Built with
Rust 54%
TypeScript 42%
Updated 1 weeks ago
TypeScript
61%
EPL-2.0

Huly Platform

Collaboration · Project Management · Team Chat

27,797

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
62
Dependency
Built with
TypeScript 61%
Svelte 34%
Updated 1 weeks ago
Rust
100%
Other

Meilisearch

Search

59,424

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

View details
89
Repo Health
88
Technical
68
Dependency
Built with
Rust 100%
Updated 2 weeks ago
Rust
63%
MIT

PostgresML

AI Development · Databases

6,825

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

View details
51
Repo Health
76
Technical
64
Dependency
Built with
Rust 63%
JavaScript 11%
Updated 1 years ago
Python
55%
Other

PostHog

Ab Testing Experimentation · Analytics · Developer Tools

39,975

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
65
Dependency
Built with
Python 55%
TypeScript 36%
Updated 1 weeks ago
Rust
70%
AGPL 3.0

RustDesk

Networking

124,658

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

View details
93
Repo Health
84
Technical
71
Dependency
Built with
Rust 70%
Dart 22%
Updated 1 weeks ago
Rust
98%

Stalwart

Collaboration

14,848

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
65
Dependency
Built with
Rust 98%
Updated 1 weeks ago
Rust
64%
Apache 2.0

Temps

Analytics · Devops · Monitoring

801

A self-hosted Rust PaaS that replaces Vercel, Sentry, PostHog, Pingdom, Resend, and E2B with one binary — plus 440+ CLI operations agents like Claude Code can drive directly.

View details
81
Repo Health
86
Technical
70
Dependency
Built with
Rust 64%
TypeScript 34%
Updated 1 weeks ago

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