winnow-rs / winnow

Making parsing a breeze
https://docs.rs/winnow
Other
513 stars 39 forks source link

Support `Read` + `Seek` types as a `Stream` #299

Open epage opened 1 year ago

epage commented 1 year ago

Please complete the following tasks

winnow version

0.5.0

Describe your use case

For parsers dealing with large on disk files

Describe the solution you'd like

Something akin to zesterer/chumsky#466

Alternatives, if applicable

No response

Additional Context

No response

kszlim commented 5 months ago

Is my understanding correct that this would be akin to implementing https://github.com/rust-bakery/nom-bufreader/ for winnow?

epage commented 5 months ago

That would be another good source of inspiration.

I think before anyone got started, we likely need to evaluate the use cases, the limitations of this approach on those use cases, and how viable this would be as a generally useful solution.

kszlim commented 5 months ago

Yeah, i don't think I have the rust skills to implement this, was just curious if it would basically be an attempt to fulfill that niche?

kszlim commented 1 month ago

Curious if this is on the radar for you at all? Seems like it would be a massive ergonomics win, but I understand that open source takes a lot of time!

epage commented 1 month ago

I've not had to do binary parsing in nom in years so I have a hard time evaluating the relative benefit of some of these changes and I am pretty swamped on some of my other projects atm. I would be open to looking at a draft. You can see my workspace/package template at https://github.com/epage/_rust . To get an idea of applying it to only a package, see https://github.com/assert-rs/snapbox