Repository navigation
Add etchy-kicad S-expression parser - #396
Merged
Merged
Conversation
Bounded byte-level parser for .kicad_pcb files: nodes with source positions, consumption tracking for unknown-node reports, native and wasm limits, typed errors and header extraction. No geometry yet, no new dependencies. Parses the 4 MB Mad_RP2040 board (600k nodes) in about 90 ms. Refs #122
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 1, PR 3 of the native KiCad plan.
crates/etchy-kicad, no external dependencies, builds for wasm32.Consumptionlets later decoders mark what they used and list unconsumed nodes by path, for the record inventory in PR 4.version,generator,generator_version) only.Tested: 14 unit tests including mutation/truncation never panicking. The public Mad_RP2040 board (KiCad 9, 4 MB, 599,750 nodes) parses in about 90 ms in release; an optional smoke test runs it when
ETCHY_KICAD_SMOKE_FILEis set at build time. The first version re-checked the rest of the file for every string character (17.5 s on that board); fixed, with a linear-time regression test.Refs #122