ruby_wasm 2.5.0.pre.1 → 2.5.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/CONTRIBUTING.md +13 -9
  3. data/Cargo.lock +705 -451
  4. data/Gemfile +1 -1
  5. data/README.md +12 -19
  6. data/Rakefile +9 -9
  7. data/benchmarks/vm_deep_call.rb +2 -2
  8. data/docs/cheat_sheet.md +8 -8
  9. data/ext/ruby_wasm/Cargo.toml +6 -5
  10. data/ext/ruby_wasm/src/lib.rs +208 -7
  11. data/lib/ruby_wasm/build/executor.rb +4 -0
  12. data/lib/ruby_wasm/build/product/crossruby.rb +57 -23
  13. data/lib/ruby_wasm/build/product/libyaml.rb +5 -3
  14. data/lib/ruby_wasm/build/product/openssl.rb +7 -2
  15. data/lib/ruby_wasm/build/product/product.rb +3 -3
  16. data/lib/ruby_wasm/build/product/ruby_source.rb +3 -3
  17. data/lib/ruby_wasm/build/product/wasi_vfs.rb +1 -39
  18. data/lib/ruby_wasm/build/product/zlib.rb +5 -3
  19. data/lib/ruby_wasm/build/target.rb +24 -0
  20. data/lib/ruby_wasm/build/toolchain.rb +1 -1
  21. data/lib/ruby_wasm/build.rb +7 -3
  22. data/lib/ruby_wasm/cli.rb +171 -13
  23. data/lib/ruby_wasm/feature_set.rb +30 -0
  24. data/lib/ruby_wasm/packager/component_adapter/wasi_snapshot_preview1.command.wasm +0 -0
  25. data/lib/ruby_wasm/packager/component_adapter/wasi_snapshot_preview1.reactor.wasm +0 -0
  26. data/lib/ruby_wasm/packager/component_adapter.rb +14 -0
  27. data/lib/ruby_wasm/packager/core.rb +192 -4
  28. data/lib/ruby_wasm/packager/file_system.rb +20 -17
  29. data/lib/ruby_wasm/packager.rb +21 -83
  30. data/lib/ruby_wasm/rake_task.rb +2 -0
  31. data/lib/ruby_wasm/version.rb +1 -1
  32. data/lib/ruby_wasm.rb +2 -0
  33. data/package-lock.json +410 -133
  34. data/package.json +3 -3
  35. data/{tasks → rakelib}/ci.rake +3 -3
  36. data/{tasks → rakelib}/doc.rake +6 -1
  37. data/{tasks → rakelib}/format.rake +3 -2
  38. data/{tasks → rakelib}/gem.rake +4 -1
  39. data/{tasks → rakelib}/packaging.rake +34 -17
  40. data/{tasks → rakelib}/version.rake +2 -0
  41. data/sig/ruby_wasm/build.rbs +36 -31
  42. data/sig/ruby_wasm/cli.rbs +30 -3
  43. data/sig/ruby_wasm/ext.rbs +28 -3
  44. data/sig/ruby_wasm/feature_set.rbs +12 -0
  45. data/sig/ruby_wasm/packager.rbs +44 -7
  46. metadata +16 -15
  47. data/builders/wasm32-unknown-emscripten/Dockerfile +0 -43
  48. data/builders/wasm32-unknown-emscripten/entrypoint.sh +0 -7
  49. data/builders/wasm32-unknown-wasi/Dockerfile +0 -47
  50. data/builders/wasm32-unknown-wasi/entrypoint.sh +0 -7
  51. data/ruby_wasm.gemspec +0 -32
  52. /data/{tasks → rakelib}/check.rake +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7ae1888b47708e127d63f9ca22d6c3b0e052bf8e466c3ca6e732966ed17efa5f
4
- data.tar.gz: 818a32d985fa7bd2c25dadda8990ca7d399731bb0cd6f643f74f7082db87fe66
3
+ metadata.gz: 141bd526a7aa152f05058c93841d80f242c72137591183a9d5f891bf5ee715fe
4
+ data.tar.gz: 2f491189cc5667b6f601e08c1685ace9fc9992738d264c76587487a91f4bde0b
5
5
  SHA512:
6
- metadata.gz: a9e2266baeaca22fd6b76151105707bec020907f312f310f6d177e57e37bf520bb514b7166f65bd7780281b858d0b2c1a4a39605fe5d852074222c386b4c4f43
7
- data.tar.gz: 56ccd07cea6b6c18f8401ef3a7e222de3586b8279054d58ee8af7140fde0cb3809439450bf18c98cae8e7d8a41449814f7d0d18df4ff5744ccc3517d831e0796
6
+ metadata.gz: 551d4bf9b6f7485f3a286363671a1f990729a0c626dd0b2b18324146826c3176873301359003ed3978c2a36d1e5ed46d9ddce93b213968bf59f0f9302f02901d
7
+ data.tar.gz: 48ca26f8ccb3e18b39a541e3ab3c41a154a3ddec56890d0b87f3fb88a2d6f16b509558c316cb75182fa80a29c94e76f760731a0d75b0fd089d5b4415cfd46513
data/CONTRIBUTING.md CHANGED
@@ -9,6 +9,8 @@ This document describes development setup and pointers for diving into this proj
9
9
  $ git clone https://github.com/ruby/ruby.wasm
10
10
  $ cd ruby.wasm
11
11
  $ ./bin/setup
12
+ # Compile extension library
13
+ $ bundle exec rake compile
12
14
  $ rake --tasks
13
15
  ```
14
16
 
@@ -19,7 +21,7 @@ $ rake --tasks
19
21
  $ rake build:download_prebuilt
20
22
 
21
23
  # Build Ruby (if you need to build Ruby by yourself)
22
- $ rake build:head-wasm32-unknown-wasi-full-js-debug
24
+ $ rake build:head-wasm32-unknown-wasip1-full
23
25
 
24
26
  # Build npm package
25
27
  $ rake npm:ruby-head-wasm-wasi
@@ -46,15 +48,15 @@ To select a build profile, see [profiles section in README](https://github.com/r
46
48
 
47
49
  ```console
48
50
  # Build only a specific combination of ruby version, profile, and target
49
- $ rake build:head-wasm32-unknown-wasi-full
51
+ $ rake build:head-wasm32-unknown-wasip1-full
50
52
  # Clean up the build directory
51
- $ rake build:head-wasm32-unknown-wasi-full:clean
53
+ $ rake build:head-wasm32-unknown-wasip1-full:clean
52
54
  # Force to re-execute "make install"
53
- $ rake build:head-wasm32-unknown-wasi-full:remake
55
+ $ rake build:head-wasm32-unknown-wasip1-full:remake
54
56
 
55
57
  # Output is in the `rubies` directory
56
- $ tree -L 3 rubies/head-wasm32-unknown-wasi-full-js
57
- rubies/head-wasm32-unknown-wasi-full-js/
58
+ $ tree -L 3 rubies/head-wasm32-unknown-wasip1-full
59
+ rubies/head-wasm32-unknown-wasip1-full/
58
60
  ├── usr
59
61
  │   └── local
60
62
  │   ├── bin
@@ -70,9 +72,9 @@ Please follow the official instructions to install.
70
72
 
71
73
  ```console
72
74
  # Build only a specific combination of ruby version, profile, and target
73
- $ rake build:head-wasm32-unknown-emscripten-full-js
75
+ $ rake build:head-wasm32-unknown-emscripten-full
74
76
  # Output is in the `rubies` directory
75
- $ tree -L 3 rubies/head-wasm32-unknown-emscripten-full-js
77
+ $ tree -L 3 rubies/head-wasm32-unknown-emscripten-full
76
78
  rubies/head-wasm32-unknown-emscripten-full
77
79
  └── usr
78
80
  └── local
@@ -107,6 +109,8 @@ $ rake 'bump_version[0.6.0]'
107
109
  $ git commit -m"Bump version to 0.6.0"
108
110
  $ git tag 0.6.0
109
111
  $ git push origin 0.6.0
112
+ $ for pkg in pkg/ruby_wasm-*; do gem push $pkg; done
113
+ $ (cd packages/gems/js/ && gem build && gem push js-*.gem)
110
114
  ```
111
115
 
112
116
  ## Release Channels
@@ -120,5 +124,5 @@ $ npm install --save @ruby/wasm-wasi@latest
120
124
  # or if you want the nightly snapshot
121
125
  $ npm install --save @ruby/wasm-wasi@next
122
126
  # or you can specify the exact snapshot version
123
- $ npm install --save @ruby/wasm-wasi@2.4.1-2023-12-25-a
127
+ $ npm install --save @ruby/wasm-wasi@2.5.1-2024-04-21-a
124
128
  ```