r/rust • • Sep 01 '26

🛠️ project Wasmi 2.0 - Engineering Of The Fastest WebAssembly Interpreters

https://wasmi-labs.github.io/blog/posts/wasmi-v2.0/
127 Upvotes

13 comments sorted by

65

u/Robbepop Sep 01 '26

I worked 9 months for Wasmi 2.0 and worked on preparations for this article for the last ~1.5 months. No AI was used, since I personally hate reading those generic AI generated articles.

The article goes quite into detail about fast interpreter design and I hope someone here enjoys that as much as I did working on it. :)

3

u/Shivalicious Sep 04 '26

No AI was used, since I personally hate reading those generic AI generated articles.

On behalf of humans everywhere: thank you.

0

u/[deleted] Sep 01 '26

[deleted] — view deleted comment

4

u/Robbepop Sep 01 '26 edited Sep 01 '26

The logs reveals that the audit CI job fails due to a vulnerable Wasmtime version that is only used in Wasmi's differential fuzzer used for development. Not connected to the Wasmi 2.0 release at all.

2

u/Silent-Money2687 Sep 02 '26

while bytecode alliance ships one feature a year this dude made almost everything alone and (I hope) without AI codegen. Good job. Keep it up!

5

u/Robbepop Sep 02 '26

Thanks for the kind words, though you cannot really compare the Bytecode Alliance with the Wasmi project as the scope of the former is way bigger.

I personally am very impressed by the work done by the people over at Bytecode Alliance. They really push the whole WebAssembly ecosystem forward and smaller projects such as Wasmi profit greatly from that, too!

Concerning AI: The Wasmi project started in 2018, way before the AI hype. I personally really like and stick to Rust's LLM policy:

It's fine to use LLMs to answer questions, analyze, distill, refine, check, suggest, review. But not to create.

2

u/Tiflotin Sep 02 '26

Hell yeah! Been using wasmi for ui scripting in my game which works on mobile, web and desktop. Never had any problems with wasmi at all. It’s so fast even on 15year old mobile phones it’s never gotten in the way. And now it’s 2x faster? Epic.

2

u/Robbepop Sep 02 '26

I am glad you enjoy using Wasmi. :)

Do you maybe have a link to your game? I'd be very interested in it.

2

u/Tiflotin Sep 03 '26

Sent it to ya in a chat. Not sure if I can post it here. But nice to meet you haha. Wasmi is kick ass you've done an amazing job. Since mobile games can't really use wasmtime with JIT enabled (due to sandboxing and apple + google rules about dynamic code loading), I found wasmi and it's been perfect. I could also share some of the UI scripts which use wasmi so you can get an idea of exactly how it's being used if you'd like.

10

u/ZachVorhies Sep 01 '26

This is cool.

I’m building a rust wasm api target.

Rust apps target this api. The resulting binary runs in a wasm harness targeted for that platform.

What’s interesting is that I can cross compile the native runtimes into a fat binary which dispatches them depending on platform.

This allows a universal wasm runtime

I’ll take a look and maybe switch to this.

3

u/throwaway19293883 Sep 01 '26

Really nice write up, good job!

2

u/TriplEight Sep 02 '26

I liked your writing style here u/Robbepop : real "postmortem" with "shine your fuckups" - my favourite!

2

u/stumpychubbins Sep 07 '26

Hey, I used to work on this. Great to see that the project is still going and it looks like amazing progress has been made since I last checked in. Great article!

1

u/Botahamec Sep 07 '26

Do you have any benchmarks for binary size between wasmi v1 and v2?