Skip to content

DataCount Section Support#70

Merged
RyanLamansky merged 1 commit intoRyanLamansky:mainfrom
martindevans:feature/SectionDataCount
May 25, 2025
Merged

DataCount Section Support#70
RyanLamansky merged 1 commit intoRyanLamansky:mainfrom
martindevans:feature/SectionDataCount

Conversation

@martindevans
Copy link
Contributor

Added support for DataCount section in module loading. This is an optional section, only used to simplify single pass verification of a module. spec: https://webassembly.github.io/spec/core/binary/modules.html#data-count-section

No additional verification is performed, the correct value is simply read and discarded. This allows files with this section to be loaded.

@RyanLamansky
Copy link
Owner

Thanks!

Do you want to squash your two commits or are you okay with "Fixed failing test" being in the commit history as a distinct event?

@martindevans martindevans force-pushed the feature/SectionDataCount branch from d2e3399 to 67d9fd3 Compare May 25, 2025 14:03
@martindevans
Copy link
Contributor Author

I've squashed the commits.

@RyanLamansky RyanLamansky merged commit 5c6ac14 into RyanLamansky:main May 25, 2025
1 check passed
@martindevans martindevans deleted the feature/SectionDataCount branch May 25, 2025 15:10
@martindevans
Copy link
Contributor Author

Thanks, will you publish an updated nuget version with this change soon?

Actually, something I always setup on my repos is auto publishing to nuget on push to master (only actually pushing if the version number in the csproj is manually changed). With that in place, making a release is trivial and anyone can submit a PR with that version number change to start the process. Would you be interested in a PR for that?

@RyanLamansky
Copy link
Owner

I'll publish tomorrow. There are one or two small things I want to try put in before shipping.

I like having some friction to the publish process. Make it a little inconvenient for myself so I'm sure I really want to 🙂

@RyanLamansky
Copy link
Owner

I gave this some more thought and not failing on a single optional WASM 2.0 section doesn't justify a special release. It's not going to make any real-world WASM 2.0 files work.

@martindevans
Copy link
Contributor Author

Ah I didn't realise that this section is a WASM 2.0 thing!

@RyanLamansky
Copy link
Owner

Well, maybe not WASM 2.0--but it's definitely post-"MVP" for WebAssembly, which was my original target for completeness.

How did you come across this?

@martindevans
Copy link
Contributor Author

I was looking at the spec for sections (linked in my initial comment) while working on something using this library, and just noticed that this one section was missing from the Section enum. Since it's such a simple section I thought I may as well make the quick and easy PR!

@RyanLamansky
Copy link
Owner

Ah, I did the same thing when I first made the Section enum back in 2017--it simply didn't have DataCount at the time.

This will naturally be included in the next release, of course. Those are typically driven by clearing some blocker that's preventing people from using the library. The last release added a feature people wanted several years ago: conversion of WASM to .NET Standard DLL, enabling all kinds of possibilities.

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