Do you have any plans to add timeouts or some other mechanism for limiting the amount of CPU a webassembly call can use? I'm always interested in options for using WebAssembly as a sandbox to run untrusted code, but one of the things I need to protect against is an infinite loop. (I had Claude knock up an experimental Python binding to try Epsilon out, notes from that here: https://github.com/simonw/research/tree/mai…
Epsilon: A WASM virtual machine written in Go
31–40 of 47 posts
Re: Epsilon: A WASM virtual machine written in Go
#32Seems like a next step would be automatic code generation to map user-supplied (or auto-generated) interface definitions to exported WASM module functions.
Re: Epsilon: A WASM virtual machine written in Go
#33Do you have any plans to add timeouts or some other mechanism for limiting the amount of CPU a webassembly call can use? I'm always interested in options for using WebAssembly as a sandbox to run untrusted code, but one of the things I need to protect against is an infinite loop. (I had Claude knock up an experimental Python binding to try Epsilon out, notes from that here: https://github.com/simonw/research/tree/mai…
Re: Epsilon: A WASM virtual machine written in Go
#34WASM seems to be rather poorly documented in general. I used to think it is only badly documented in Ruby (which it is), but I have been slowly reading "WebAssembly The Definitive Guide" and when comparing this to information on the internet, it seems WebAssembly is years behind e. g. HTML, CSS, or JavaScript in regards to documentation. Granted, it is not the same user base (more people will be interested in HTML an…
I wonder if your question relates to WASM or things in the WASM-sphere like WASI et al? I'm not sure if it's right but I think of WASM as just an ISA and I guess the documentation seems to cover instruction encodings and semantics.
Re: Epsilon: A WASM virtual machine written in Go
#35Congratulations on the progress and getting the engine out there! One nice thing about interpreters versus JIT compilers is that they can be used in places like iOS without too much fuss (AFAIK you have to bundle all the WASM you will run though, or something like that). I'm biased since I work on it, but any considerations around adding support for the Component Model? It's more complex than the base spec of course…
Re: Epsilon: A WASM virtual machine written in Go
#36If one wanted to have a JIT compiler from what I understand it would essentially need to be able to get a chunk of memory, generate instructions into it and then jmp there.
Is creating such a thing possible in just Go?
Re: Epsilon: A WASM virtual machine written in Go
#37Only tangentially related, asking out of curiosity. If one wanted to have a JIT compiler from what I understand it would essentially need to be able to get a chunk of memory, generate instructions into it and then jmp there. Is creating such a thing possible in just Go?
wazero does this, on amd64 and arm64: https://github.com/wazero/wazero
You can read more about the approach - from the creator - here: https://mathetake.github.io/posts/runtime-code-generation-in...
Re: Epsilon: A WASM virtual machine written in Go
#38Only tangentially related, asking out of curiosity. If one wanted to have a JIT compiler from what I understand it would essentially need to be able to get a chunk of memory, generate instructions into it and then jmp there. Is creating such a thing possible in just Go?
Yes. You need some syscalls and unsafe, but it's possible. wazero does this, on amd64 and arm64: https://github.com/wazero/wazero You can read more about the approach - from the creator - here: https://mathetake.github.io/posts/runtime-code-generation-in...
Re: Epsilon: A WASM virtual machine written in Go
#39Re: Epsilon: A WASM virtual machine written in Go
#40>with 0 dependencies >Looks inside >0 dependencies Wow. Amazing. Was that a planned feature or did you just manage to write the entire project without stepping out the go std lib?
Though to be fair, for tests I am relying on https://github.com/WebAssembly/wabt