3 ms·
This is an ad. Just use WASI.
by ramesh31 3y ago
This is an ad. Just use WASI.
- xmonkee 3y agoCan you link to a similar example using WASI?
- ramesh31 3y agoTake your pick of runtimes. Wasmtime is the most popular right now. https://github.com/bytecodealliance/wasmtime/blob/main/docs/WASI-tutorial.md https://github.com/bytecodealliance/wasmtime/blob/main/docs/...
- xmonkee 3y agoThanks. I'm not sure how this maps to the original example, though. This is about compiling a standalone program which translates POSIX apis, it seems? How about calling it from Rust with string args etc?
- brabel 3y agoExactly. That's what Extism is trying to solve. That WASI post doesn't show at all how to use the WASM code from C, or vice versa, because it just compiles the entire C program to WASM which uses the POSIX-based WASI API. If you want an alternative to Extism, you need something like wasmer.io, not just wasmtime (Extism actually uses wasmtime as mentioned in the post).
- ramesh31 3y agoRight. The point being that you can take your pick of WASI compliant runtimes which have those features. Extism isn't something special compared to any other open source project in this domain, yet it smells of a commercial venture. Count me out.
- xmonkee 3y ago>Extism isn't something special compared to any other open source project in this domain Well, ok, can you give me an example of some other project doing this sort of interop without manual memory mapping?
- nilslice 3y agoWASI is great and obviously Extism supports it as a superset of functionality - but you don’t always want to give your guest code access to system resources even in a limited environment. Extism also offers a bunch of other features that you don’t get with WASI. But use what’s best suited for your needs!
- VyseofArcadia 3y agoClaiming to make a thing that is already easy easy is a whole business model.
- simonw 3y ago"Just" use WASI is not useful advice. I've been trying to do that for my own purposes for over a year. The learning curve on that (as a Python programmer who wants to use WebAssembly for sandboxing) is practically a vertical wall.