Epsilon: A WASM virtual machine written in Go

github.com

149 points by ziggy42 10 days ago


hardwaresofton - 2 days ago

Congratulations 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 but incredibly robust -- really the present/future of "modern" WebAssembly across languages.

shevy-java - 2 days ago

WASM 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 and CSS simply because there is a bigger pool of people interested in that, rather than in WebAssembly), but still - documentation appears to become really worse in general on the internet. Finding it too.

So in this regard, having more implementations may be useful (more opportunity to improve documentation) - thus while I am in general skeptical, this is good news here, even if I do not use Go myself.

simonw - 2 days ago

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/main/epsilon-python-... )

Gys - 2 days ago

This could have been a Show HN?

Also: would be nice to see wazero (https://github.com/wazero/wazero) mentioned. What was the reason to create Epsilon as an alternative?

karel-3d - 2 days ago

How does this compare with wazero?

sureglymop - a day ago

Only 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?

donatj - 2 days ago

Nice! I started building a toy Go WASM VM myself but a few hours in realized I was in way over my head. Seems very readable, I'm going to want to go to school on this!

mring33621 - 2 days ago

Very nice!

Seems like a next step would be automatic code generation to map user-supplied (or auto-generated) interface definitions to exported WASM module functions.

praveen9920 - 2 days ago

Nice project.!

Is 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.

koolala - a day ago

I can't wait till this will be able to run in WASM on the web. Looks cool.

aeve890 - 2 days ago

>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?

_s_a_m_ - 2 days ago

[flagged]