---
title: "Introducing Ruvy"
description: "Ruvy is an open-source toolchain built on ruby.wasm that compiles Ruby scripts into WebAssembly modules, pre-initializing the Ruby VM and preloaded Ruby files at build time instead of at startup."
url: "https://swe.quest/articles/introducing-ruvy-a780cb3b4891bef0"
canonical: "https://shopify.engineering/introducing-ruvy"
source: "Shopify Engineering"
published: "2023-10-18"
difficulty: "medium"
kind: "Announcement"
reading_minutes: 5
tags: ["webassembly","ruby","performance","open-source"]
---

# Introducing Ruvy

A post on [Shopify Engineering](https://swe.quest/sources/shopify.md), published 2023-10-18, 5 min read, Announcement. Original: [https://shopify.engineering/introducing-ruvy](https://shopify.engineering/introducing-ruvy)

## Summary

Ruvy is an open-source toolchain built on ruby.wasm that compiles Ruby scripts into WebAssembly modules, pre-initializing the Ruby VM and preloaded Ruby files at build time instead of at startup. Compared with ruby.wasm plus wasi-vfs, Ruvy modules instantiate and run about 20% faster (roughly 44 ms vs 56 ms in Wasmtime) and compile to native code with Cranelift about 70% faster (about 0.45 s vs 1.65 s). Because the script is embedded, Ruvy modules need no WASI arguments at runtime, which suits edge platforms that can't pass them. Ruvy is currently built from source, and contributions are invited, including Shopify Functions compatibility work.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [WebAssembly](https://swe.quest/tags/webassembly.md) (Languages)
- [Ruby](https://swe.quest/tags/ruby.md) (Languages)
- [Performance engineering](https://swe.quest/tags/performance.md) (Reliability & operations)
- [Open source](https://swe.quest/tags/open-source.md) (Engineering practices)

## Prerequisites

- WebAssembly basics ([easy posts on WebAssembly](https://swe.quest/tags/webassembly.md?difficulty=easy))
- WASI

## Keywords

Ruvy, ruby.wasm, wasi-vfs, WASI, Wasmtime, Cranelift, Shopify Functions

## Related posts

- [Life of a Zed Extension: Rust, WIT, Wasm](https://swe.quest/articles/life-of-a-zed-extension-rust-wit-wasm-ec148b04db708b5a.md): Zed · 2024-10-21 · Medium · 21 min read · WebAssembly, Rust, Developer tools
  Zed extensions are written in Rust but never compiled on the user's machine.
- [Bringing Javascript to WebAssembly for Shopify Functions](https://swe.quest/articles/bringing-javascript-to-webassembly-for-shopify-functions-80a81868faf1489b.md): Shopify Engineering · 2023-02-09 · Medium · 16 min read · WebAssembly, JavaScript, Runtimes & VMs, Rust, Serverless
  Shopify runs JavaScript in Shopify Functions by compiling the QuickJS interpreter to WebAssembly/WASI via Javy.
- [Introducing Turso in the Browser](https://swe.quest/articles/introducing-turso-in-the-browser-111a711a5e4d489d.md): Turso · 2025-10-08 · Medium · 3 min read · SQLite, WebAssembly, Browsers, Local-first & sync, JavaScript
  Turso, a from-scratch SQLite rewrite, now runs in the browser via WebAssembly as the npm package @tursodatabase/database-wasm, with a better-sqlite3-like API whose methods are all async because of OPFS.
- [WebAssembly functions for your SQLite-compatible database](https://swe.quest/articles/webassembly-functions-for-your-sqlite-compatible-database-e23432782d9473c3.md): Turso · 2022-11-23 · Medium · 6 min read · SQLite, WebAssembly, Rust, Databases
  libSQL, Turso's open-contribution fork of SQLite, adds user-defined functions written in WebAssembly and registered directly from SQL with a CREATE FUNCTION ...
- [Bun v0.3.0](https://swe.quest/articles/bun-v0-3-0-ce34b4df06ef614a.md): Bun · 2022-12-07 · Medium · 8 min read · JavaScript, Runtimes & VMs, Performance engineering
  Bun v0.3.0 focuses on stability and Node.js/Web API compatibility, cutting memory use 3-5x under load by scheduling garbage collection in coordination with the event loop and speeding up TextEncoder.encodeInto() 3x via simdutf.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
