-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dbd5312
commit 78507db
Showing
21 changed files
with
41 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -129,7 +129,7 @@ $ npm install --save @ruby/wasm-wasi@latest | |
# or if you want the nightly snapshot | ||
$ npm install --save @ruby/wasm-wasi@next | ||
# or you can specify the exact snapshot version | ||
$ npm install --save @ruby/[email protected].0-2024-11-11-a | ||
$ npm install --save @ruby/[email protected].1-2025-01-23-a | ||
``` | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,7 @@ Create and save `index.html` page with the following contents: | |
|
||
```html | ||
<html> | ||
<script src="https://cdn.jsdelivr.net/npm/@ruby/[email protected].0/dist/browser.script.iife.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/@ruby/[email protected].1/dist/browser.script.iife.js"></script> | ||
<script type="text/ruby"> | ||
require "js" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,7 +38,7 @@ The easiest way to run Ruby on browser is to use `browser.script.iife.js` script | |
|
||
```html | ||
<html> | ||
<script src="https://cdn.jsdelivr.net/npm/@ruby/[email protected].0/dist/browser.script.iife.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/@ruby/[email protected].1/dist/browser.script.iife.js"></script> | ||
<script type="text/ruby"> | ||
require "js" | ||
JS.global[:document].write "Hello, world!" | ||
|
@@ -51,8 +51,8 @@ If you want to control Ruby VM from JavaScript, you can use `@ruby/wasm-wasi` pa | |
```html | ||
<html> | ||
<script type="module"> | ||
import { DefaultRubyVM } from "https://cdn.jsdelivr.net/npm/@ruby/[email protected].0/dist/browser/+esm"; | ||
const response = await fetch("https://cdn.jsdelivr.net/npm/@ruby/[email protected].0/dist/ruby+stdlib.wasm"); | ||
import { DefaultRubyVM } from "https://cdn.jsdelivr.net/npm/@ruby/[email protected].1/dist/browser/+esm"; | ||
const response = await fetch("https://cdn.jsdelivr.net/npm/@ruby/[email protected].1/dist/ruby+stdlib.wasm"); | ||
const module = await WebAssembly.compileStreaming(response); | ||
const { vm } = await DefaultRubyVM(module); | ||
|
@@ -69,11 +69,11 @@ If you want to control Ruby VM from JavaScript, you can use `@ruby/wasm-wasi` pa | |
|
||
```html | ||
<html> | ||
<script src="https://cdn.jsdelivr.net/npm/@ruby/[email protected].0/dist/browser.umd.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/@ruby/[email protected].1/dist/browser.umd.js"></script> | ||
<script> | ||
const main = async () => { | ||
const { DefaultRubyVM } = window["ruby-wasm-wasi"]; | ||
const response = await fetch("https://cdn.jsdelivr.net/npm/@ruby/[email protected].0/dist/ruby+stdlib.wasm"); | ||
const response = await fetch("https://cdn.jsdelivr.net/npm/@ruby/[email protected].1/dist/ruby+stdlib.wasm"); | ||
const module = await WebAssembly.compileStreaming(response); | ||
const { vm } = await DefaultRubyVM(module); | ||
|
@@ -128,7 +128,7 @@ end | |
|
||
```html | ||
<html> | ||
<script src="https://cdn.jsdelivr.net/npm/@ruby/[email protected].0/dist/browser.script.iife.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/@ruby/[email protected].1/dist/browser.script.iife.js"></script> | ||
<script type="text/ruby" data-eval="async"> | ||
require "js" | ||
|
@@ -143,8 +143,8 @@ Or using `@ruby/wasm-wasi` package API `RubyVM#evalAsync`: | |
```html | ||
<html> | ||
<script type="module"> | ||
import { DefaultRubyVM } from "https://cdn.jsdelivr.net/npm/@ruby/[email protected].0/dist/browser/+esm"; | ||
const response = await fetch("https://cdn.jsdelivr.net/npm/@ruby/[email protected].0/dist/ruby+stdlib.wasm"); | ||
import { DefaultRubyVM } from "https://cdn.jsdelivr.net/npm/@ruby/[email protected].1/dist/browser/+esm"; | ||
const response = await fetch("https://cdn.jsdelivr.net/npm/@ruby/[email protected].1/dist/ruby+stdlib.wasm"); | ||
const module = await WebAssembly.compileStreaming(response); | ||
const { vm } = await DefaultRubyVM(module); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module RubyWasm | ||
VERSION = "2.7.0.dev" | ||
VERSION = "2.7.1" | ||
end |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module JS | ||
VERSION = "2.7.0.dev" | ||
VERSION = "2.7.1" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,7 @@ $ npm install --save @ruby/wasm-emscripten@latest @ruby/head-wasm-emscripten@lat | |
# or if you want the nightly snapshot | ||
$ npm install --save @ruby/head-wasm-emscripten@next | ||
# or you can specify the exact snapshot version | ||
$ npm install --save @ruby/[email protected].0-2024-11-11-a | ||
$ npm install --save @ruby/[email protected].1-2025-01-23-a | ||
``` | ||
|
||
## Quick Start | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<html> | ||
<script src="https://cdn.jsdelivr.net/npm/@ruby/[email protected].0/dist/browser.script.iife.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/@ruby/[email protected].1/dist/browser.script.iife.js"></script> | ||
<script type="text/ruby"> | ||
puts "Hello, world!" | ||
</script> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<html> | ||
<script src="https://cdn.jsdelivr.net/npm/@ruby/[email protected].0/dist/browser.script.iife.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/@ruby/[email protected].1/dist/browser.script.iife.js"></script> | ||
<button id="draw">Draw Omikuji</button> | ||
<div id="result"></div> | ||
<script type="text/ruby"> | ||
|
2 changes: 1 addition & 1 deletion
2
packages/npm-packages/ruby-wasm-wasi/example/script-src/index.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<html> | ||
<script src="https://cdn.jsdelivr.net/npm/@ruby/[email protected].0/dist/browser.script.iife.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/@ruby/[email protected].1/dist/browser.script.iife.js"></script> | ||
<script type="text/ruby" src="hello.rb"></script> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters