Stream: wasm

Topic: Reproducibility


view this post on Zulip David Lloyd (Sep 11 2023 at 15:45):

What is a reasonable expectation for an API which models (and can read and write) a WASM program, in terms of reproducibility? Is it reasonable to expect that the model might reorder components such as elements or data segments or types between read and write? If not, is it better to preserve the original order or to establish some other predictable order (for example, sorting criteria) to ensure that a given input gives an output that is at least repeatable?

view this post on Zulip David Lloyd (Sep 11 2023 at 15:46):

or, should the model (or compiler) have complete flexibility to emit stuff in any random order?

view this post on Zulip Jamey Sharp (Sep 12 2023 at 17:21):

I think that's an interesting question! I don't personally have a good answer for most cases but I want to mention that the order of custom sections can sometimes matter. For example, https://github.com/WebAssembly/tool-conventions/blob/main/DynamicLinking.md defines a "dylink.0" custom section and says "This section is expected to be the very first section in the module."

view this post on Zulip David Lloyd (Sep 12 2023 at 17:51):

that makes sense


Last updated: Dec 23 2024 at 12:05 UTC