-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[API Proposal]: Get wasm custom sections inside assembly #112649
Comments
Tagging subscribers to 'arch-wasm': @lewing |
Can you encode these metadata as assembly attributes? Accessing them will become much easier this way. |
No, this metadata writed after build, because some .NET components of our system used in several independant projects For example our build steps Building Common Components Step Building Project 1 Step Building Project 2 Step Component 1 and Component 2 are common assemblies - and build server compile these assemblies only once |
Let's figure out how to actually read the information at runtime.
2 years ago I did parser in TS as an experiment, it's not that bad. @radekdoulik has managed parser, maybe that's better suited for the task. Overall I think it's not necessary for runtime to implement this. @fsmoke could you please share more about your use-case ? |
If you know the section name, which seems to be your case, you can use the https://developer.mozilla.org/en-US/docs/WebAssembly/Reference/JavaScript_interface/Module/customSections_static method to retrieve the custom section data on the JS side. |
This issue has been marked |
This issue has been automatically marked |
Background and motivation
WASM binary format allow to add custom sections for any additional information, for example we use it for storing some meta information of our product. but Our investigation did not find out how to read these information direct from within the executing assembly(on browser client).
My suggesstion to add ability of reading custom WASM sections at runtime
API Proposal
API Usage
Alternative Designs
No response
Risks
No response
The text was updated successfully, but these errors were encountered: