Skip to content
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

[wasm-metadata] parse OCI author custom section #1925

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

yoshuawuyts
Copy link
Member

This PR adds support for parsing the author custom section, implementing parts of #1922. Thanks!

Draft Notes

I'm filing this PR early and as a draft because I'm not 100% sure I'm following best practices here. It's my first time using wasmparser and wasm-encoder, and I'm for example not sure whether parse_wasm should take a BinaryReader or CustomSectionReader.

Also: I was looking for something like a Parse trait, but I don't think wasmparser has one? I quite liked the encoder side of things.

Finally: in this PR I'm basically just wrapping CustomSection in a newtype - however that means storing the internal data as a byte array rather than a string. How do we feel about that?

I'm asking these questions since I'm planning to repeat this pattern a number of times for the other custom sections, and it seems worth making sure it's early on. Thanks!

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