Six parsers, one crate each
Take the one you need. Each language has its own crate, its own tree and its own way of handling mistakes, and none of them drags in the others.
HTML
The HTML Standard says exactly how to recover from every mistake a page can make. Parsec follows it, so the tree you get is the tree a browser would build.
CSS
From a stylesheet’s first token to an element’s computed values: the syntax, the values of every property the specs define, and the cascade that decides which one wins.
JavaScript
A parser, not an engine. It reads a script, tells you what’s in it and where, and never runs a line of it.
XML
XML’s rules, not HTML’s recovery. A well-formedness error stops the parse, a name is its namespace and local part, and entities expand only as far as you allow.
URL
Links resolved the way a browser resolves them, from the standard’s current text, with the same shape as the JavaScript
URLAPI.Encoding
A page in Shift_JIS whose
<meta>says UTF-8 is a normal day for a crawler. Parsec picks the encoding the way a browser does and tells you how sure it is.
Which one do I add?
Most people want parsec-web. It's the HTML parser with selectors, XPath, encodings and URLs switched on, and it's what the Python, JavaScript and C packages are built from. The others are for when you need one language and nothing else: CSS syntax without an HTML tokenizer, say, or a JavaScript parser for a build tool.
Every crate is released together, at the same version, and none reaches a Parsec crate it isn't allowed to. CI checks that on every change; Architecture has the rules.