You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There has been some activity this year to support wasm build ids in the WebAssembly/tool-conventions repo that may be useful if you want to add this feature in the future:
Thanks, I appreciate the pointer. I'll keep an eye on that as it moves along.
I think I'll also need to figure out how one would read a wasm section (like the build_id one proposed in the linked ticket) from within the binary itself. The mechanisms used on hosted systems (mac & unix-likes) use functions/symbols provided by the system ld.so (or equivalent) to allow examination of the executable itself in memory.
Do you know if wasm (or perhaps wasi) has similar functions to allow reading from arbitrary sections? Or perhaps some symbols that are resolved automatically to allow a program to read from a section?
That's a good question. Now that I'm thinking about it, I wonder what use there would be for the buildid from within the wasm execution environment, given that it cannot access its own code pages or stack traces (as I understand it, happy to be corrected). Contrast this with native binaries where a panic/unwind could be caught and used to introspect the code pages for extra details and e.g. logging or reporting it.
Brainstorming some ideas:
You could add buildid to requests and responses to trace which wasm binaries are used in some service path. Then again, the wasm binary could just fake this so it's not very secure; maybe it would be better for the host to handle this responsibility.
(that's all I got 😆)
As far as implementation goes, I doubt wasm will ever grow more complete introspection capabilities to directly read arbitrary sections. So maybe the path to getting the buildid from wasm would be by publishing a convention for the embedder to place the buildid function or constant into a particular entry in a table.
Hi, I noticed that
buildid
does not currently support getting the build id for wasm objects,https://github.com/jmesmon/buildid/blob/3a2b95fb3ade0d7231b69622cbafa6df309f7e88/src/lib.rs#L157-L168
There has been some activity this year to support wasm build ids in the WebAssembly/tool-conventions repo that may be useful if you want to add this feature in the future:
WebAssembly/tool-conventions#133
The text was updated successfully, but these errors were encountered: