Skip to content

Latest commit

 

History

321 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Uzumibi

Uzumibi's Logo

Uzumibi is a Ruby web framework and project generator for WebAssembly-based edge and serverless runtimes. Ruby application code is compiled to mruby bytecode at build time and executed by mruby/edge inside a platform-specific host.

The uzumibi CLI currently provides templates for:

  • Cloudflare Workers
  • Fastly Compute
  • Spin
  • Google Cloud Run
  • Browser Service Workers
  • Browser Web Workers

Documentation

Quick start with Cloudflare Workers

Install the CLI and the WebAssembly target:

cargo install uzumibi-cli
rustup target add wasm32-unknown-unknown

Create and run a project:

uzumibi new --template cloudflare my-app
cd my-app
pnpm install
pnpm run dev

Edit lib/app.rb to define routes:

class App < Uzumibi::Router
  get "/" do |req, res|
    res.return(
      200,
      { "content-type" => "text/plain" },
      "Hello from #{RUBY_ENGINE} #{RUBY_VERSION}\n"
    )
  end

  get "/hello/:name" do |req, res|
    res.return(
      200,
      { "content-type" => "text/plain" },
      "Hello, #{req.params[:name]}!\n"
    )
  end
end

$APP = App.new

For Cloudflare Workers, pnpm run dev rebuilds the Wasm module and starts Wrangler. See the Cloudflare Workers guide for request-size configuration, external services, static assets, and Queue consumers.

Workspace components

  • uzumibi-cli — generates platform-specific application projects
  • uzumibi-gem — defines Uzumibi::Router, Request, and Response
  • uzumibi-art-router — route matching and path-parameter extraction
  • uzumibi-cloudflare-ext — Cloudflare host APIs exposed to Ruby
  • uzumibi-google — Google Cloud integrations used by the Cloud Run template
  • uzumibi-on-*-spike directories — development and integration examples for individual runtimes

How to pronounce “Uzumibi”

Uzumibi (うずみび) is pronounced roughly as “oo-zoo-mee-bee.” The Japanese word refers to live embers kept under ash so that the fire does not go out.

About

Uzumibi allows Ruby applications run on edge function services

Topics

Resources

Stars

10 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages