Binding mruby to WebAssembly use WebIDL
- Emscripten SDK
To compile project, please make sure your
emsdk is already configured with
$EMSDK environment and
Please make sure you are use
LLVMversion instead Fastcomp version. The
LLVMversion can install by use
emsdk install latest-upstream.
Compile mruby and generate
glue.js for WebIDL
Generate mruby's WebAssembly file
rake wasm rake js rake html
rake htmlis default task, you can specify which output you wants
If you want to minify for production, please add
MINIFY=1 rake html
# Create mruby.html rake html # Serve mruby.wasm ruby -run -e httpd .
Goto http://localhost:8080/mruby.html and open the console to execute ruby code.
var ruby = new Ruby() ruby.Execute('puts "Hello World"')
mruby.wasm to your project and load WebAssembly by yourself.
Currently this project is for prototype to test use mruby on browser, it is not stable!