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…
I'm working on an embeddable mini VM (RISC-V rather than WASM) and am considering this. In my model, there's something akin to a hardware watchdog where the VM is considered hung if it executes too many instructions without calling a yield() function in the host, then there's the ability to set a maximum number of instructions to execute before returning to the caller. This lets it be handled asynchronously at the pa…
Epsilon: A WASM virtual machine written in Go
21–30 of 47 posts
Re: Epsilon: A WASM virtual machine written in Go
#22Earlier quoted context omitted.
Started as fun "what if" side project, but kept me interested for 3 years now. Turns out it's actually useful. It's pretty portable: with some caveats, it works pretty much everywhere Go does. Performance is bad outside amd64/arm64, but for most popular OS/platforms it's fine. See this for an overall picture (these are the platforms I test): https://github.com/ncruces/go-sqlite3/wiki/Support-matrix I bet you could do…
I love sqlite a lot but there is always this idea in my head that maybe some day I might out grow sqlite and require postgres which in my opinion can be just "enough" Starting out with postgres if done via pglite and similars with golang's sqlite-ish approach can be brilliant I guess and I had this what if idea sort of inspired by yours actually but I don't think I can do that project basically right now but yea Idk…
Re: Epsilon: A WASM virtual machine written in Go
#23Do 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…
Funny that you built a Python wrapper as I originally started this implementation in Python, which was...not a good idea. Claude hallucinated the acknowledgments section though :D
Re: Epsilon: A WASM virtual machine written in Go
#24WASM 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…
Re: Epsilon: A WASM virtual machine written in Go
#25Do 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
#26Is there anything akin to file sockets api for wasm? I see a lot of potential in using them with go channels for ipc between multiple wasm modules.
Re: Epsilon: A WASM virtual machine written in Go
#27WASM 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…
It becomes a huge pain in the bum as soon as you have to deal with moving anything more than trivial types around, because you have to manually allocate memory for the WASM runtime and move bytes around. The byte representation needs to be understandable by the source language for your WASM code (the v language in my case). This is why these WASM runtimes use ints in their README examples, it would look and be horrendously complex otherwise.
If one is looking to use WASM for something for plugin development in the backend, I would try and look for something that is not WASM generic, but works with the source language, and where the WASM aspect is an under-the-hood detail.
Re: Epsilon: A WASM virtual machine written in Go
#28WASM 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…
Or occasionally I Google specific Wasm instructions and find .wat examples for them on MDN.
I'm sure you're right that the documentation is years behind that of HTML and CSS, but is there some specific aspect of Wasm documentation that you find lacking that isn't covered by the spec?
Re: Epsilon: A WASM virtual machine written in Go
#29>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?
Re: Epsilon: A WASM virtual machine written in Go
#30WASM 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…
WASM development is really for a "level lower" than HTML, CSS, and JavaScript development. I know this because, being curious about it myself, I tried a year ago to make use of a WASM runtime in Go to run a piece of WASM code (I think I wrote something in V and compiled it to WASM). It becomes a huge pain in the bum as soon as you have to deal with moving anything more than trivial types around, because you have to m…