Skip to content

(wip) Iterator based parsing#142

Draft
trkohler wants to merge 4 commits into
AeroRust:mainfrom
trkohler:iterator-based-parsing
Draft

(wip) Iterator based parsing#142
trkohler wants to merge 4 commits into
AeroRust:mainfrom
trkohler:iterator-based-parsing

Conversation

@trkohler

@trkohler trkohler commented Jan 4, 2025

Copy link
Copy Markdown
Contributor

This is work in progress, but was published to receive an initial feedback.

connect: #53

@codecov

codecov Bot commented Jan 4, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.84%. Comparing base (afb133b) to head (ca4dc7a).
⚠️ Report is 39 commits behind head on main.

Files with missing lines Patch % Lines
src/stream.rs 92.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #142      +/-   ##
==========================================
+ Coverage   78.67%   78.84%   +0.17%     
==========================================
  Files          39       40       +1     
  Lines        1449     1475      +26     
==========================================
+ Hits         1140     1163      +23     
- Misses        309      312       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@CramBL

CramBL commented Jun 6, 2026

Copy link
Copy Markdown
Member

May I suggest that you take a look at the parser implementation in ublox-rs: https://github.com/ublox-rs/ublox/blob/master/ublox/src/parser.rs

It is also a streaming parser, and it has all the features you could want:

  • no_std
  • Zero copy
  • Uses a two-segment scatter-gather view to avoid memcpys (would fit perfectly for NMEA)
  • Generic over all the major ublox protocol versions
  • Generic over buffer size and whether its heap or entirely stack allocated
  • Ergonomic instantiation via a compile-time builder pattern

I'm not saying your parser needs to have all these features right away, but all these features (obviously with NMEA versions instead of ublox protocol versions) are generally very useful for a streaming parser.

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.

2 participants