A high-performance, browser-grade HTML5 parser written in Rust, developed as part of the Servo project.
html5ever is a high-performance HTML5 parser written in Rust, originally developed for the Servo browser project. It parses and serializes HTML according to WHATWG specifications while providing the hooks needed for browser-grade functionality like document.write. The parser aims to combine C-level performance with Rust's memory safety to avoid common security vulnerabilities.
Developers building web browsers, crawlers, or tools requiring robust HTML parsing, particularly those working in Rust ecosystems or needing standards-compliant, high-performance parsing.
It offers a unique combination of standards compliance, browser-grade features, and the safety/performance benefits of Rust, making it ideal for projects where security and speed are critical without sacrificing web compatibility.
High-performance browser-grade HTML5 parser
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Delivers parsing speeds comparable to C while leveraging Rust's memory safety, as highlighted in the README for high-performance needs.
Implements WHATWG HTML5 specifications and passes most html5lib tests, ensuring broad web compatibility for real-world use.
Supports essential browser features like document.write, making it suitable for engines requiring full web compatibility.
Avoids common C security vulnerabilities through Rust's ownership model, providing a secure foundation for parsing.
Requires custom implementation via callbacks for DOM manipulation, adding complexity compared to parsers with integrated tree representations.
Currently supports only UTF-8, with other encodings planned but not yet implemented, limiting handling of legacy documents.
Acknowledges differences from WHATWG specs and not all html5lib tests are passed, as documented in the bug tracker.