---
title: "Introducing Ruvy"
description: "Ruvy is an open-source toolchain that takes Ruby code as input and produces a WebAssembly module whose exported _start function executes that code. Built on ruby.wasm, it pre-initializes the Ruby virtual machine and includes Ruby files during the build, while avoiding the need to supply a Ruby script path as a WASI argument at runtime. In Wasmtime benchmarks, Ruvy’s instantiation and _start execution took about 44.4–45.2 ms, compared with 55.8–56.9 ms for ruby.wasm plus wasi-vfs, and its Wasm-to-native compilation took about 440–457 ms versus 1.62–1.68 seconds. These results correspond to roughly 20% faster runtime performance and about 70% less compilation time in the reported tests. Ruvy currently requires users to install build dependencies and compile it because precompiled binaries are not shipped."
---

# Introducing Ruvy

[Shopify](https://yomu.fyi/company/shopify) · 2023-10-18 · Oct 18, 2023

**Type:** Announcement

## Summary

Ruvy is an open-source toolchain that takes Ruby code as input and produces a WebAssembly module whose exported \_start function executes that code. Built on ruby.wasm, it pre-initializes the Ruby virtual machine and includes Ruby files during the build, while avoiding the need to supply a Ruby script path as a WASI argument at runtime. In Wasmtime benchmarks, Ruvy’s instantiation and \_start execution took about 44.4–45.2 ms, compared with 55.8–56.9 ms for ruby.wasm plus wasi-vfs, and its Wasm-to-native compilation took about 440–457 ms versus 1.62–1.68 seconds. These results correspond to roughly 20% faster runtime performance and about 70% less compilation time in the reported tests. Ruvy currently requires users to install build dependencies and compile it because precompiled binaries are not shipped.

## Context

Ruby programs compiled with ruby.wasm and wasi-vfs start the Ruby virtual machine during WebAssembly execution and require a Ruby script path to be supplied as a WASI argument. The latter requirement can make execution difficult in computing environments that cannot provide additional WASI arguments, including various edge computing services.

## Approach / What changed

Ruvy builds on ruby.wasm by pre-initializing the Ruby virtual machine during WebAssembly module creation, packaging Ruby files included by the script, and producing a module that does not require a file path as a WASI argument at runtime. Its CLI can also preload every file in a specified directory so those definitions are available to the input Ruby file.

## Takeaways

- Ruvy’s reported Wasmtime execution benchmarks were about 44.4–45.2 ms, compared with 55.8–56.9 ms for ruby.wasm plus wasi-vfs.
- Ruvy’s reported Cranelift compilation benchmarks were about 440–457 ms, while ruby.wasm plus wasi-vfs took about 1.62–1.68 seconds.
- Ruvy does not currently ship precompiled binaries; users must install build dependencies and compile the toolchain before using it.

**Tags:** [Developer Experience](https://yomu.fyi/topic/developer-experience), [Open Source](https://yomu.fyi/topic/open-source), [Performance](https://yomu.fyi/topic/performance)

- Source: [Shopify](https://shopify.engineering/introducing-ruvy)
- Source URL: https://shopify.engineering/introducing-ruvy
- Ingested by Yomu: 2026-08-30T13:20:50.852Z

[Read original post](https://shopify.engineering/introducing-ruvy)
