Skip to content

HASH32/wasm-ruby

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

Build Ruby files to WebAssembly with mruby. This repo contains the compile toolchain for ruby to wasm, with docker.

Usage

Setup Docker

cd docker-machine
docker build -t awin/emcc-mruby .

Build WebAssembly

cd intro
docker run \
  --rm \
  -v $(pwd):/src \
  -u emscripten \
  awin/emcc-mruby \
  ruby_wasm build hello.rb

This should generate app.js and app.wasm in the intro directory.

Serve the Files

cd intro
ruby server.rb

And open http://localhost:8000 in the browser. In developer tools console, you should find the console statement

Credits

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published