3 ms·
> None of that is standard though. WebIDL is pretty much standard as for defining the ABI for the web APIs. All browser engines use it as far as I'm aware. I
by syrusakbary 4y ago
> None of that is standard though.
WebIDL is pretty much standard as for defining the ABI for the web APIs.
All browser engines use it as far as I'm aware.
I agree that there is no standard way to do it from any language other than JS, but from JS that's pretty much set. I wonder why do we need to recreate rather than reuse. It will be way simpler if Wasm simply adopts WebIDL and the languages bindings just adapt to it with slight modifications (such as DOMString or others)
https://webidl.spec.whatwg.org/ https://webidl.spec.whatwg.org/
- deleted 4y ago[deleted]
- rektide 4y agoHave you, ceo of wasmer, suggested worked on or seen efforts to make WebIDL an ABI for wasm to work across? I think of webidl as a very abstract high level interface that browsers can use to generate some stubs, specific to their engines with. I feel like with wasm there ought be a stable ABI so modules can be interoperable across implementations. It's an interesting suggestion to imagine trying to extend WebIDL to fit the job. As ceo of wasmer you must certainly be aware of at least some of the sundry low level details & duties that WIT has to perform. I feel like it's pretty likely we'll end up with some WebIDL to WIT generators or tooling that can help get the web platform wasm-sized. It is a bit self serving to go off & create a new thing, to serve wasm's use case first, but the low level abi Vs high level idl nature of WIT Vs WebIDL does seem like pretty different fundamental objectives, at least to me, but maybe & wouldn't it be great if we could have a simpler unified IDL like you suggest?
- syrusakbary 4y ago> Have you, ceo of wasmer, suggested worked on or seen efforts to make WebIDL an ABI for wasm to work across? Me, as CEO of Wasmer and son of my mother, have seen efforts in many contexts to try to reuse standards rather than recreate them. Jokes aside, I think it's useful to think on how things that already exist can fit the current panorama rather than creating new standards that might take longer to adopt. > As ceo of wasmer you must certainly be aware of at least some of the sundry low level details & duties that WIT has to perform Of course I think that WebAssembly Interfaces can fulfill some part of the picture. In fact, at Wasmer we have been working on that front to make sure it fulfills our company needs [1]. But in the context of the browser, I think WebIDL would have fulfilled the goal of DOM access from Wasm in a way faster way than any other "standard" that is not yet standardized. I'm here advocating for use-case first (product led development), rather than tech-first. I wrote about this in more detail here, in case you may be interested! [2] [1] https://github.com/wasmerio/wai https://github.com/wasmerio/wai [2] https://wasmer.io/posts/is-not-about-wasm-is-about-what-you-can-build-with-it https://wasmer.io/posts/is-not-about-wasm-is-about-what-you-...