GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - desktop-cgi/wasm-ruby: wasm-ruby files for ruby versions

BranchesTags
Open more actions menu

Latest commit

 

History

14 Commits
14 Commits

Folders and files

NameName
Last commit message
Last commit date
demos
demos
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 
setupfolder.sh
setupfolder.sh
 
 

Repository files navigation

wasm-ruby

wasm-ruby files for ruby versions

WebAssembly port of CRuby by Emscripten with a thin JavaScript wrapper to run ruby scripts in node.js

WebAssembly port of CRuby with WASI.

USAGE:
import fs from "fs/promises";
import { DefaultRubyVM } from "@ruby/wasm-wasi/dist/node.cjs.js";

const main = async () => {
  const binary = await fs.readFile(
    //  Tips: Replace the binary with debug info if you want symbolicated stack trace.
    //  (only nightly release for now)
    //  "./node_modules/ruby-head-wasm-wasi/dist/ruby.debug+stdlib.wasm"
    "./node_modules/ruby-head-wasm-wasi/dist/ruby.wasm"
  );
  const module = await WebAssembly.compile(binary);
  const { vm } = await DefaultRubyVM(module);

  vm.eval(`
    luckiness = ["Lucky", "Unlucky"].sample
    puts "You are #{luckiness}"
  `);
};

main();

Other RUBY WASI WASM Usage demos

https://www.npmjs.com/package/ruby-head-wasm-wasi

https://www.npmjs.com/package/ruby-head-wasm-emscripten

https://www.npmjs.com/package/ruby-wasm-emscripten: Note: The emscripten demos for the port of ruby.wasm currently has issues and throws an error.

BUILD REPO SCRIPTS:

https://github.com/ruby/ruby.wasm

About

wasm-ruby files for ruby versions

Resources

Readme
MIT license
Activity
Custom properties

Stars

0 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.