In September 2026, I released rspec-wasm , a tool for running RSpec tests on ruby.wasm, and introduced it in my previous DEV article:
Stop Writing Ruby Tests in JS Template Literals: Meet rspec-wasm
I've now released rspec-wasm v0.2.0 , which adds support for asynchronous JavaScript setup and teardown around RSpec execution.
One of the great advantages of building applications with WebAssembly is the ability to combine functionality from different Wasm modules.
However, until now, rspec-wasm had no way to asynchronously initialize an external runtime before running RSpec tests or clean it up afterward.
With v0.2.0, we can initialize external JavaScript or Wasm runtimes before running RSpec, making it possible to test Ruby code that interacts with them.
In this article, I'll demonstrate the new functionality by testing Ruby code that uses a WebAssembly-based MP3 decoder.
Why Use External Wasm Modules with ruby.wasm?
When developing applications with ruby.wasm, building a custom Wasm binary can expandβ¦