Skip to content

Should we add our own wasmi_parse crate to replace wasmparser usage? #1514

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Robbepop opened this issue May 10, 2025 · 0 comments
Open

Should we add our own wasmi_parse crate to replace wasmparser usage? #1514

Robbepop opened this issue May 10, 2025 · 0 comments
Labels
question Further information is requested

Comments

@Robbepop
Copy link
Member

Robbepop commented May 10, 2025

As the title suggests this is currently an unanswered question.

This issue is about the idea to add a custom Wasm parsing crate to the Wasmi workspace: wasmi_parse
The wasmi_parse crate would replace today's Wasmi's wasmparser uage.

The main reason behind a custom wasmi_parse crate is that it seems that Wasmi's niche needs are somewhat unaligned with most other users of wasmparser. For example:

Advantages

  • More control over the features implemented in the Wasm parsing abtractions.
  • Wasm parsing could potentially be more specific to Wasmi's unique needs and thus improve performance.
  • The wasmparser crate deals with way more than what Wasmi needs, e.g. the component model and legacy features such as the legacy exception handling.

Downsides

  • The Wasmi team (me) has to maintain yet another major crate.
  • Wasmi no longer profits from upstream improvements so easily.
  • It is no longer as easy to help upstream wasmparser with wasmi_parse being its own fork.
  • We once had wasmparser-nostd and it was a mess to maintain it, however, unlike wasmi_parse, wasmparser-nostd was never meant to evolve away from wasmparser and be specific to Wasmi's needs.
@Robbepop Robbepop added question Further information is requested tech-debt An issue to resolve some technical debt. and removed tech-debt An issue to resolve some technical debt. labels May 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant