Dave Bakker
Dave Bakker
This just came up again in https://github.com/WebAssembly/wasi-sockets/issues/128 > the work is just to generalize the bindings generators to be able to call and implement result-returning constructors. If anyone wants to...
I've got the proposed changes (https://github.com/WebAssembly/component-model/pull/550) working at: - `wasm-tools`: https://github.com/bytecodealliance/wasm-tools/compare/main...badeend:wasm-tools:fallible-constructors - `wit-bindgen`: https://github.com/bytecodealliance/wit-bindgen/compare/main...badeend:wit-bindgen:fallible-constructors - I've updated the Rust generator. - The C generator happened to work immediately, without further...
FYI, support for this has landed in wasm-tools, wit-bindgen & wasmtime
I'd say so, yes ✅
WASI's [stdio](https://github.com/WebAssembly/WASI/blob/f367c465d5032e5fe9c6b960ae2c0a81a50da4e5/proposals/cli/wit-0.3.0-draft/stdio.wit) is fully async. There has been [discussion](https://github.com/WebAssembly/WASI/issues/757) about this before. The nearest counterpart in browsers (`console.log`) never blocks and can be called in getters/setters/constructors/etc despite technically doing I/O....
> this seems somewhat fragile and hazardous I agree ;) > perhaps the way to square this circle is to add synchronous read/write functions to the stdin/stdout/stderr interfaces, alongside the...
I think this touches the same underlying problem of https://github.com/WebAssembly/component-model/issues/231, albeit with a different proposed solution. One issue is that the `use` syntax uses the `.` separator, and at the...