You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 24, 2026. It is now read-only.
Everything in this crate is pub(crate): parse(), Document, NodeId, NodeKind, Attribute, Position. This is deliberate per the project's Step 1 scope (see CLAUDE.md/README's "Scope" section) — building only what html-conform needs, no premature public API — but as a consequence, the crate can't be depended on by anything outside itself yet, including html-conform, even though that's the entire reason the project exists.
Solution path
This is Step 2 of the plan already described in README.md/CLAUDE.md, but it doesn't have to be "the big generic extraction" all at once — split it:
Minimal pub surface for html-conform integration (near-term, unblocks the actual reason this crate exists):
pub fn parse(input: &str) -> Document in lib.rs.
pub the Document/NodeId/NodeKind/Attribute/Position types and their accessor methods (Document::root, Document::children, Document::node, Document::parent, ...) — just what an html-conform::infoset::normalize()-equivalent needs to walk the tree, nothing from Tokenizer/TreeBuilder internals.
Add rustdoc comments to the newly-public surface (current doc comments were written for an internal audience; review them with an external reader in mind).
Keep Tokenizer/TreeBuilder and everything else pub(crate) — no reason to commit to their shape publicly yet.
Validate against html-conform's real usage: once html-conform can actually depend on this crate (path or git dependency first, not necessarily published to crates.io yet), write the adapter layer in html-conform's own repo (its src/infoset.rs-equivalent) that replaces its current HTML5-parsing dependency, and run html-conform's existing test suite against it. This is explicitly cross-repo work — not something this repo's issue tracker should try to own end to end — but this issue can track whether the pub surface from step 1 turns out to be sufficient, and adjust based on what that integration actually needs.
Full generic extraction (the actual "Step 2"): only after step 2 above is proven, revisit whether to extract a fully generic, html-conform-agnostic WHATWG tokenizer/tree-builder as this crate's real public API (per the two-stage plan) — e.g. exposing Tokenizer/TreeBuilder themselves, supporting fragment parsing, etc. Track as a separate, later issue once there's real signal for what "generic" needs to mean in practice, not speculatively.
Once there's a real pub surface, publish to crates.io (currently explicitly not published, per README).
Recommend tackling step 1 first — it's small, mechanical, and is the actual blocker for html-conform integration.
Problem
Everything in this crate is
pub(crate):parse(),Document,NodeId,NodeKind,Attribute,Position. This is deliberate per the project's Step 1 scope (see CLAUDE.md/README's "Scope" section) — building only what html-conform needs, no premature public API — but as a consequence, the crate can't be depended on by anything outside itself yet, including html-conform, even though that's the entire reason the project exists.Solution path
This is Step 2 of the plan already described in README.md/CLAUDE.md, but it doesn't have to be "the big generic extraction" all at once — split it:
pubsurface for html-conform integration (near-term, unblocks the actual reason this crate exists):pub fn parse(input: &str) -> Documentinlib.rs.pubtheDocument/NodeId/NodeKind/Attribute/Positiontypes and their accessor methods (Document::root,Document::children,Document::node,Document::parent, ...) — just what anhtml-conform::infoset::normalize()-equivalent needs to walk the tree, nothing fromTokenizer/TreeBuilderinternals.Tokenizer/TreeBuilderand everything elsepub(crate)— no reason to commit to their shape publicly yet.src/infoset.rs-equivalent) that replaces its current HTML5-parsing dependency, and run html-conform's existing test suite against it. This is explicitly cross-repo work — not something this repo's issue tracker should try to own end to end — but this issue can track whether thepubsurface from step 1 turns out to be sufficient, and adjust based on what that integration actually needs.Tokenizer/TreeBuilderthemselves, supporting fragment parsing, etc. Track as a separate, later issue once there's real signal for what "generic" needs to mean in practice, not speculatively.pubsurface, publish to crates.io (currently explicitly not published, per README).Recommend tackling step 1 first — it's small, mechanical, and is the actual blocker for html-conform integration.