Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign up[Question] Curious what is the state of WebAssembly Web API #1221
Comments
|
The Web Embedding API is at https://webassembly.github.io/spec/web-api/index.html Both documents are linked from https://webassembly.github.io/spec/ |
Yeah, I am interested in Web API from WebAssembly without JavaScript ... first spec ... |
|
There are also no proposals related to the Web API that'd finalize the specification into WASM itself, has all development stalled regarding this? |
|
The current wasm-web-api is a W3C REC, and can be found here: https://www.w3.org/TR/wasm-web-api/ |
@binji But what is more interesting is how many done in specification ... I mean, is it 50% complete, maybe 20% or maybe 60% ? For me it seems like 10% done according the size of document ... |
|
The WebAssembly specification is layered. The Web API spec builds on the JS API spec, which builds on the core API spec. What functionality are you expecting that is missing? If you are asking about being able to access web APIs without using JS, then you may want to take a look at the interface-types proposal. Edit: I was a bit unclear here, interface-types doesn't let you access Web APIs without using JavaScript, but it provide a nicer mechanism for using Web APIs from WebAssembly. |
@binji Yes, I am asking about accessing Web API without JS ... |
|
@redradist No, there are no plans to expose Web APIs to WebAssembly directly without going through JS. |
|
@tlively can I get a source on this? I have only seen direct assertions that this is on the roadmap, even mozilla's website says so. |
|
Ah, I guess there is some nuance depending on what you mean by "direct access" to Web APIs.
|
@tlively The topic is mostly about calling Web API without JavaScript, through WebAssembly directly to browser ... |
To summarize, no, there is no such proposal at the moment. But proposals such as ES Module integration and interface types might help make the JS more invisible when calling Web APIs. |
@tlively Don't you think this is strange ? JavaScript compiles to intermediate representation that than executed by Engine, but WebAssembly is closer to Engine execution step than JavaScript JavaScript -> Parsing ->Optimizations -> WebAssembly -> Intermediate Representation -> Engine And every time WebAssembly call should go from: It is strange and due to this in engine you should implement a lot of workarounds as my opition |
I am curious what is the state of WebAssembly Web API ?