Repository navigation
Roadmap
Parsec has one aim: to be the parser you'd pick over Lexbor on every count that matters to you. Faster on the same pages, measured in one process against Lexbor's own C; at least as conformant on every public suite; memory-safe; and pleasant to use from Rust, C, Python and the browser.
This page follows ROADMAP.md and the milestones on GitHub, adding the issues in each.
Note
Nothing moves from planned to done until it ships with its tests, and when it does, the page that documents it here changes too.
The marks are the ones used across this wiki: ✅ shipped and checked by cargo test, 🚧 in progress, 📋 planned (Home has the key).
| Milestone | What it brings | |
|---|---|---|
| ✅ | M0. Foundations | The parser core, CI, fuzzing, this wiki. Merged in #1. |
| 📋 | M1. Proof | Benchmarks against Lexbor, conformance counts from CI |
| 📋 | M2. HTML, past Lexbor | Bytes, chunks, parse errors, positions, a depth limit |
| 📋 | M3. Selectors | The pseudo-classes a static page can decide |
| 📋 | M4. Every way in | C, Python and WebAssembly |
| 📋 | M5. Encoding | The WHATWG Encoding Standard |
| 📋 | M6. URL | WHATWG URL |
| 📋 | M7. CSS | A CSS parser and computed values |
| 📋 | M8. XPath | XPath 1.0 |
| 📋 | 0.1.0 | The first release |
The milestones run in order, and the release doesn't wait for all of them:
flowchart LR
m0["M0<br/>Foundations"] --> m1["M1<br/>Proof"]
m1 --> m2["M2<br/>HTML"]
m2 --> m3["M3<br/>Selectors"]
m3 --> m4["M4<br/>Every way in"]
m4 --> m5["M5<br/>Encoding"]
m5 --> m6["M6<br/>URL"]
m6 --> m7["M7<br/>CSS"]
m7 --> m8["M8<br/>XPath"]
m4 ==>|"M1 to M4 done, and ahead<br/>on every page in the corpus"| rel(["0.1.0"])
Milestone. The repository, CI on Linux, macOS and Windows, the shared parser core and the check that keeps it in step with Netweir, fuzzing, this wiki, and the roadmap. It all merged in #1.
Milestone. Before Parsec claims to be faster than Lexbor, a harness has to show it, and the conformance counts should come from CI rather than from prose.
- #2 Benchmark Parsec against Lexbor's own C in one process
- #3 Benchmark selector matching against Lexbor
- #4 Publish conformance counts from CI
The results replace the borrowed numbers on Benchmarks and in the README.
Milestone. Everything Lexbor's HTML module does that Parsec doesn't yet, and the things Lexbor's users have asked it for.
- #5 Parse bytes, sniffing the encoding as browsers do
- #6 Chunked input that builds exactly the same tree
- #7 Report parse errors with their spec names, line and column
- #8 Source positions on every node and attribute
- #9 Pretty-printed and html5lib-format serialization
- #10 A depth limit alongside the time budget
- #11 Documents that are Send and Sync, checked at compile time
- #12 Node handles that know when their node was removed
Milestone. Close the list of pseudo-classes Lexbor parses and never matches, wherever a static document has the answer.
-
#13 Match
:blankand:defined -
#14 Match
:lang()and:dir() - #15 Match the form pseudo-classes Lexbor can't
-
#16 Match
:targetand:local-linkgiven a URL -
#17 Namespace prefixes, the column combinator and
:nth-col() - #18 Lazy queries that stop at the first match (and specificity)
- #19 Run the web-platform-tests selector cases that don't need layout
Milestone. How Lexbor's users, and the bindings built on it, can switch.
- #20 A C API with a generated header
- #21 Prebuilt C libraries for Linux, macOS and Windows
- #22 A guide for moving from Lexbor (started at Moving from Lexbor)
- #23 A Python package
- #24 WebAssembly for npm
Milestone. The WHATWG Encoding Standard's 40 encodings, decoding and encoding, streaming into the parser, with the WPT encoding cases in CI.
- #25 The WHATWG Encoding Standard
Milestone. WHATWG URL, URLSearchParams, IDNA, Punycode and Unicode normalization, with the WPT URL pass counts published, then a benchmark against Lexbor's URL parser and Ada.
Milestone. The CSS Syntax parser, passing css-parsing-tests with positions on every rule; then the CSS Object Model, every property in the spec's index, custom properties and var(), calc(), media queries evaluated against an environment you give, and computed values with inheritance.
- #28 A CSS Syntax parser that passes css-parsing-tests
-
#29 Custom properties,
var(),calc()and every longhand - #30 Media queries and computed values
Milestone. XPath 1.0 over Parsec's tree, shared with Netweir.
- #31 XPath 1.0 over Parsec's tree
Milestone. The first release goes to crates.io, PyPI and npm as parsec-html once M1 to M4 are done and the benchmarks show Parsec ahead on every page in the corpus.
- #32 Release 0.1.0
Proof comes first because nothing else should be claimed without it. HTML and selectors come next because they're what almost every Lexbor binding uses: parse, select, read text, serialize, edit a little. The ways in (C, Python, WebAssembly) follow, since that's how most of Lexbor's users would actually switch. Encoding comes before URL, and URL before CSS: parsing real pages from bytes needs the encodings, and the bindings need that before the larger modules.
Want something sooner, or something that isn't here? Say so in Discussions. The order is set by what people need.
- Changelog, for what has already landed.
- Comparison with Lexbor, for why each milestone matters to Lexbor's users.
- Contributing, if you'd like to help with one.
Parsec is Apache-2.0 and not yet released; these pages describe main. Found something wrong here? Open an issue or ask in Discussions.
Repository · Issues · Discussions · Roadmap · Security policy · Licence