make a basic hello world work on wasip2#4582
Conversation
|
Thank you for contributing to Miri! |
| } | ||
| // We don't actually close these FDs, so this is a NOP. | ||
| } | ||
| "[method]output-stream.blocking-write-and-flush" => { |
There was a problem hiding this comment.
I found https://github.com/bytecodealliance/wasi-rs/blob/01af74f3c71dee1afebb75612031732ee3346e4f/crates/wasip2/src/imports.rs#L4516C21-L4517C84 but do you know where these things are actually documented?
There was a problem hiding this comment.
I found https://wasmcloud.com/docs/reference/wasi/interfaces/ but that uses higher-level types, so I ended up reversing this based on the file you linked.
There was a problem hiding this comment.
The high level interfaces are specified in https://github.com/WebAssembly/WASI/tree/main/wasip2 The exact symbol names are merely a contract between wit-bindgen and wasm-tools component new. They are not part of the ABI after linking. Based on bytecodealliance/wasm-tools#1828 it seems that wit-bindgen is going to change the used names in the future once wasm-tools versions with support for the new naming scheme are old enough.
With rust-lang/rust#146207 finally switching to a provenance-compatible API, this can now be made to work.