Extism makes WebAssembly easy
dylibso.com
Extism makes WebAssembly easy
1–10 of 100 posts
Re: Extism makes WebAssembly easy
#2Re: Extism makes WebAssembly easy
#3Re: Extism makes WebAssembly easy
#4At least consider mirroring to the web - or at this stage inform people you will one day make posts available on the open web. Acquiring that consent afterwards is painful.
Re: Extism makes WebAssembly easy
#5https://github.com/WebAssembly/stringref/blob/main/proposals...
Re: Extism makes WebAssembly easy
#6The idea of Wasm as a universal plugin system is very promising. But string passing is maybe not the best example to highlight, considering that Wasm is introducing stringref to enable zero-copy string sharing between the Wasm runtime and host language. https://github.com/WebAssembly/stringref/blob/main/proposals...
It's currently still a stage 1 proposal, while we've been waiting for years for other proposals to be merged. The last time a proposal was actually finished was over 2 years ago.
https://github.com/WebAssembly/proposals
https://github.com/WebAssembly/proposals/blob/main/finished-...
Re: Extism makes WebAssembly easy
#7I was absolutely going to call a function, pass it some HTML to parse (as a string), and return a number, but what I wound up doing is pass a directory with some HTML file in it, return a number as a string, and parse it. Because after struggling with wasmtime and wasmer until I could see it was not going to perform acceptably with a Ruby interpreter packed into the Wasm module, I found that further, it was seemingly impossible to call a function from in Ruby with any meaningful parameters without going through the system interface to the Wasm.
https://youtu.be/EsAuJmHYWgI?list=PLbzoR-pLrL6prBc8UnTQ9wI3B...
and
https://youtu.be/EsAuJmHYWgI?list=PLbzoR-pLrL6prBc8UnTQ9wI3B...
The article does a much better job of explaining these issues concretely, but if you're totally lost, you can hear my fever-dream version of the same ideas here. (I am a Wasm beginner.)
But if you don't have time to watch, tl;dr: I gave up, my Wasm in the end was called as a WASI, which I passed a filesystem context into rather than attempt to call any function at all, and I parsed the output from the system interface. Not too different than what it looks like the Extism example is doing. I will definitely be going through these docs as it seems likely to help me understand better what I've missed, and moreover that it has Ruby support right on the front page chef's kiss
Re: Extism makes WebAssembly easy
#8Another open Source project locking their community discussions away on Discord where it can't be easily discovered or searched. At least consider mirroring to the web - or at this stage inform people you will one day make posts available on the open web. Acquiring that consent afterwards is painful.
Re: Extism makes WebAssembly easy
#9The idea of Wasm as a universal plugin system is very promising. But string passing is maybe not the best example to highlight, considering that Wasm is introducing stringref to enable zero-copy string sharing between the Wasm runtime and host language. https://github.com/WebAssembly/stringref/blob/main/proposals...
This is the first time I saw a mention of WTF-8 [1] and WTF-16. From the spec description this seems strange to use this interoperability "hack" (using the word from the spec) as the foundation of the string proposal. I wonder if they could use UTF-8 instead and keep WTF-16 for interoperability with JavaScript.
> WTF-8 [...] is a superset of UTF-8 that encodes surrogate code points if they are not in a pair. It represents, in a way compatible with UTF-8, text from systems such as JavaScript and Windows that use UTF-16 internally but don’t enforce the well-formedness invariant that surrogates must be paired. WTF-8 is a hack intended to be used internally in self-contained systems with components that need to support potentially ill-formed UTF-16 for legacy reasons.
Re: Extism makes WebAssembly easy
#10The idea of Wasm as a universal plugin system is very promising. But string passing is maybe not the best example to highlight, considering that Wasm is introducing stringref to enable zero-copy string sharing between the Wasm runtime and host language. https://github.com/WebAssembly/stringref/blob/main/proposals...
While it'd be a nice addition, I wouldn't expect it any time soon. It's currently still a stage 1 proposal, while we've been waiting for years for other proposals to be merged. The last time a proposal was actually finished was over 2 years ago. https://github.com/WebAssembly/proposals https://github.com/WebAssembly/proposals/blob/main/finished-...
I think wasm is still great without these fixes, but I have lost confidence in the idea that wasm will reach its full potential any time soon.