r/programming 9h ago

Wasmi 2.0 - Engineering of the Fastest Wasm Interpreters

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

4 comments sorted by

20

u/Robbepop 9h ago

Author here. :) I worked 9 months on Wasmi 2.0 and ~1.5 months on just this article and the preparation that went into it.

The article goes quite deep into technical details about fast interpreter design and I hope someone here enjoys reading it as much as it did working on it.

Happy to answer questions.

Note: article is fully hand-written since I hate reading generic AI written articles myself.

3

u/gajus0 7h ago

Impressive. Love the dedication to one project.

What are people using this predominantly for?

I have bookmarked a few projects in this category over the years, but never really ran into the need for it. Would love some real-world examples. I envision that in the agentic age there are more than ever.

3

u/Robbepop 6h ago

Thank you!

Real-world users as discussed in the article:

  • Plugin Systems:
    • Typst (WASI plugins for its typesetting language)
    • Zellij (terminal multiplexer plugins)
    • Josh (Git filters)
  • Smart Contracts:
    • Stellar's Soroban
    • Ripple: deterministic execution and metered gas matter more there than raw speed
  • Game Engines:
    • Firefly Zero: an awesome handheld console whose cartridges are Wasm modules
  • Embedded/IoT and Cloud Hosts
    • Sometimes a JIT is not allowed or no option. Some platforms forbid JIT entirely, e.g. iOS or some hardened cloud sandboxes.

Also recently someone approached me about using Wasm runtimes (e.g. Wasmi) for LLM-generated throw-away code. Considering Wasmi's outstanding startup times, this might also be a great fit.

The Wasmi readme features even more known users: https://github.com/wasmi-labs/wasmi#used-by

1

u/gajus0 4h ago

Not what I would have guessed. Interesting. Thanks for sharing.