| Crates.io | htmlmail |
| lib.rs | htmlmail |
| version | 0.1.0 |
| created_at | 2025-10-28 23:06:13.107967+00 |
| updated_at | 2025-10-28 23:06:13.107967+00 |
| description | Practical, fast, and correct email validator |
| homepage | |
| repository | https://codeberg.org/aumetra/htmlmail |
| max_upload_size | |
| id | 1905751 |
| size | 38,286 |
Fast, readable, correct. Choose three.
Validates email addresses according to the WHATWG HTML specification.
It also enforces some practical size limits SMTP imposes (because what good is an email you can't address?).
Good question! This started off as an experiment. I wanted to implement a simple parser using winnow that is readable and correct.
Performance wasn't even a consideration when I started out. It just happened. A happy little accident.
I then started writing out some basic benchmarks and noticed that we are faster than fast_chemail in pretty much every bench.
At least on my machine.
So I thought "hey, this is worth publishing. It's fast, readable, and correct. And really small so people can just audit it themselves!".
winnow. No unreadable regexes or handrolled parsers.fast_chemailfast_chemail and added a few more weird cases to ensure correctness.Note: The test suite isn't ported 1:1 since fast_chemail actually rejects some emails that are actually allowed by the WHATWG standard.
We also run property tests against the official regex published by the WHATWG. This should ensure additional correctness.
This code is licensed under the MIT or Apache-2.0 license, at your choice.