Skip to content

Commit f65a110

Browse files
committed
ruby-wasm: add pristine ruby.wasm setup with bundler support
based on ruby/ruby.wasm#358
1 parent daf2b04 commit f65a110

File tree

5 files changed

+35
-0
lines changed

5 files changed

+35
-0
lines changed

ruby-wasm/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*.wasm
2+
build
3+
rubies

ruby-wasm/bin/pristine-build

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
cd ../pristine
5+
bundle exec rbwasm build -o ruby.wasm

ruby-wasm/bin/pristine-run

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
# Usage:
5+
#
6+
# $ ./pristine-run -e 'puts Time.now'
7+
# 2024-07-17 16:13:41 +0000
8+
#
9+
10+
cd ../pristine
11+
wasmtime run ruby.wasm "$@"

ruby-wasm/pristine/Gemfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
source "https://rubygems.org"
2+
3+
gem "ruby_wasm"

ruby-wasm/pristine/Gemfile.lock

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
GEM
2+
remote: https://rubygems.org/
3+
specs:
4+
ruby_wasm (2.6.2-arm64-darwin)
5+
6+
PLATFORMS
7+
arm64-darwin
8+
9+
DEPENDENCIES
10+
ruby_wasm
11+
12+
BUNDLED WITH
13+
2.5.14

0 commit comments

Comments
 (0)