Skip to content

feat: Parsec had no parser, no CI and nothing to read - #1

Merged
jamesconwaydev merged 3 commits into
mainfrom
foundations
Nov 4, 2026
Merged

jamesconwaydev merged 3 commits into
mainfrom
foundations

Conversation

@jamesconwaydev

Copy link
Copy Markdown
Collaborator

Problem

The repository held a licence and a one-line README.

Change

  • The parser core. crates/parsec (the package is parsec-html; you use parsec) is Netweir's crates/netweir-html, copied by scripts/sync-from-netweir.sh with its crate names changed. NETWEIR_COMMIT records the Netweir commit it came from.
  • Its tests, as Netweir runs them:
    • the html5lib tokenizer tests, from a submodule;
    • the web-platform-tests tree-construction cases, pinned in crates/parsec/tests/tree-construction;
    • the selector and editing tests;
    • the fuzz target.
  • CI:
    • fmt, clippy, cargo-deny and cargo test on Linux, macOS and Windows;
    • a drift check that fails if crates/parsec no longer matches Netweir at the pinned commit;
    • nightly fuzzing, OpenSSF Scorecard and a CLA check.
  • Project files: the README with an animated header, ROADMAP, CONTRIBUTING, CLA, Code of Conduct, SECURITY, GOVERNANCE, SUPPORT, NOTICE, issue and PR templates, Dependabot and deny.toml.

Tests

cargo test passes locally: 7,045 html5lib tokenizer tests, the WPT tree-construction cases with scripting on and off, and the selector, editing and unit tests. The drift check passes against Netweir at 82d977f.

The parser core comes from Netweir's crates/netweir-html, copied by
scripts/sync-from-netweir.sh with its crate names changed; the Netweir
commit it came from is in NETWEIR_COMMIT. Its tests run here as they do
there: the html5lib tokenizer tests (a submodule), the pinned
web-platform-tests tree-construction cases, and the selector and
editing tests.

CI checks formatting, clippy, cargo-deny and the tests on Linux, macOS
and Windows, and fails if the core has drifted from Netweir. Fuzzing
runs nightly. The README, roadmap, contributing guide, CLA, security
policy and issue templates say how the project works.
Parsec moved to the parsec-html organization, and with it reported
content can reach the maintainer privately, so the Code of Conduct now
says to use "Report to repository admins".
It holds for the slow inputs in examples/hostile.rs, not yet for every
input, so the README now says which ones and the comparison marks the
general claim as planned.
@jamesconwaydev
jamesconwaydev merged commit e299690 into main Nov 4, 2026
5 of 6 checks passed
@jamesconwaydev
jamesconwaydev deleted the foundations branch November 4, 2026 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant