Reputation: 8919
I am just reading about WASM but have never used it. I read in an article that only integers and floats can be passed from WASM to javascript. The article was dated 2019. Has that limitation changed in the interim?
Upvotes: 0
Views: 269
Reputation: 216
Webassembly is a low level language so it deals basic types as number and arrays of of numbers (sometimes called buffers) these can on the other han represent other things such as images or audio files or video files.
So you can for instance load an image via javascript pass it to a webassembly library for processing (like applying a filter).
There are also different frameworks libraries for communicating higher level structures to webassembly. One such is Blazor (for using C# compiled to webassembly) another is e.g. Qt for WebAssembly for creting Qt user interfaces in webassembly.
Upvotes: 1