ruby_wasm 2.5.0-x86_64-darwin → 2.5.2-x86_64-darwin

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/CONTRIBUTING.md +9 -7
  3. data/Gemfile +1 -1
  4. data/README.md +12 -11
  5. data/Rakefile +9 -7
  6. data/docs/cheat_sheet.md +8 -8
  7. data/lib/ruby_wasm/3.1/ruby_wasm.bundle +0 -0
  8. data/lib/ruby_wasm/3.2/ruby_wasm.bundle +0 -0
  9. data/lib/ruby_wasm/{3.0 → 3.3}/ruby_wasm.bundle +0 -0
  10. data/lib/ruby_wasm/build/executor.rb +4 -0
  11. data/lib/ruby_wasm/build/product/crossruby.rb +59 -25
  12. data/lib/ruby_wasm/build/product/libyaml.rb +5 -3
  13. data/lib/ruby_wasm/build/product/openssl.rb +7 -2
  14. data/lib/ruby_wasm/build/product/product.rb +3 -3
  15. data/lib/ruby_wasm/build/product/ruby_source.rb +3 -3
  16. data/lib/ruby_wasm/build/product/wasi_vfs.rb +1 -1
  17. data/lib/ruby_wasm/build/product/zlib.rb +3 -1
  18. data/lib/ruby_wasm/build/target.rb +24 -0
  19. data/lib/ruby_wasm/build/toolchain/wit_bindgen.rb +2 -2
  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 +147 -11
  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 +199 -5
  28. data/lib/ruby_wasm/packager/file_system.rb +5 -3
  29. data/lib/ruby_wasm/packager.rb +22 -82
  30. data/lib/ruby_wasm/rake_task.rb +1 -0
  31. data/lib/ruby_wasm/version.rb +1 -1
  32. data/lib/ruby_wasm.rb +2 -0
  33. data/package-lock.json +5571 -7015
  34. data/package.json +3 -3
  35. data/rakelib/check.rake +23 -10
  36. data/rakelib/ci.rake +3 -3
  37. data/rakelib/packaging.rake +44 -15
  38. data/sig/ruby_wasm/build.rbs +38 -28
  39. data/sig/ruby_wasm/cli.rbs +27 -3
  40. data/sig/ruby_wasm/ext.rbs +25 -2
  41. data/sig/ruby_wasm/feature_set.rbs +12 -0
  42. data/sig/ruby_wasm/packager.rbs +44 -7
  43. metadata +11 -9
  44. data/builders/wasm32-unknown-emscripten/Dockerfile +0 -43
  45. data/builders/wasm32-unknown-emscripten/entrypoint.sh +0 -7
  46. data/builders/wasm32-unknown-wasi/Dockerfile +0 -47
  47. data/builders/wasm32-unknown-wasi/entrypoint.sh +0 -7
@@ -1,43 +0,0 @@
1
- FROM emscripten/emsdk:3.1.31
2
-
3
- ARG NODE_MAJOR_VERSION=20
4
-
5
- RUN set -eux; \
6
- apt-get update; \
7
- apt-get install -y ca-certificates curl gnupg; \
8
- mkdir -p /etc/apt/keyrings; \
9
- curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg; \
10
- echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR_VERSION.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list; \
11
- apt-get update; \
12
- apt-get install ruby ruby-dev ruby-bundler nodejs \
13
- bison make autoconf git curl build-essential \
14
- libyaml-dev zlib1g-dev gosu \
15
- libclang-13-dev -y; \
16
- apt-get clean; \
17
- rm -r /var/lib/apt/lists/*
18
-
19
- # Prefer apt-installed nodejs instead of emsdk's old one.
20
- ENV PATH=/usr/bin:$PATH
21
-
22
- ENV RUSTUP_HOME=/usr/local/rustup \
23
- CARGO_HOME=/usr/local/cargo \
24
- PATH=/usr/local/cargo/bin:$PATH \
25
- RUST_VERSION=1.75
26
-
27
- RUN set -eux pipefail; \
28
- curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \
29
- sh -s -- -y --no-modify-path --profile minimal --default-toolchain $RUST_VERSION; \
30
- chmod -R a+w $RUSTUP_HOME $CARGO_HOME
31
-
32
- ENV BUNDLE_PATH=/usr/local/gems
33
- RUN set -eux; \
34
- mkdir -p $BUNDLE_PATH; \
35
- chmod -R 777 $BUNDLE_PATH
36
-
37
- COPY entrypoint.sh /usr/local/bin/entrypoint.sh
38
- RUN chmod +x /usr/local/bin/entrypoint.sh
39
- ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
40
- # Build with non-root user because `@npmcli/promise-spawn` sets `uid` and `gid` to cwd owner when the current user is root.
41
- # This permission demotion results in EACCES error at reading `$HOME/.node_modules` in `resolve` package, which is used by `@rollup/plugin-node-resolve`.
42
- # * https://github.com/npm/cli/blob/32336f6efe06bd52de1dc67c0f812d4705533ef2/node_modules/%40npmcli/promise-spawn/lib/index.js#L13
43
- RUN adduser --disabled-password --gecos '' me
@@ -1,7 +0,0 @@
1
- #!/bin/bash
2
-
3
- set -e
4
-
5
- [ ! -z "${RUBYWASM_UID+x}" ] && usermod --uid "$RUBYWASM_UID" --non-unique me
6
- [ ! -z "${RUBYWASM_GID+x}" ] && groupmod --gid "$RUBYWASM_GID" --non-unique me
7
- exec gosu me "$@"
@@ -1,47 +0,0 @@
1
- FROM debian:bullseye
2
-
3
- ARG WASI_PRESET_ARGS_VERSION=0.1.1
4
- ARG NODE_MAJOR_VERSION=20
5
-
6
- RUN set -eux; \
7
- apt-get update; \
8
- apt-get install -y ca-certificates curl gnupg; \
9
- mkdir -p /etc/apt/keyrings; \
10
- curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg; \
11
- echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR_VERSION.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list; \
12
- apt-get update; \
13
- apt-get install ruby ruby-dev ruby-bundler nodejs \
14
- bison make autoconf git curl build-essential \
15
- libyaml-dev zlib1g-dev gosu \
16
- libclang-13-dev -y; \
17
- apt-get clean; \
18
- rm -r /var/lib/apt/lists/*
19
-
20
- RUN set -eux pipefail; \
21
- wasi_preset_args_url="https://github.com/kateinoigakukun/wasi-preset-args/releases/download/v${WASI_PRESET_ARGS_VERSION}/wasi-preset-args-x86_64-unknown-linux-gnu.zip"; \
22
- curl -LO "$wasi_preset_args_url"; \
23
- unzip wasi-preset-args-x86_64-unknown-linux-gnu.zip; \
24
- mv wasi-preset-args /usr/local/bin/wasi-preset-args
25
-
26
- ENV RUSTUP_HOME=/usr/local/rustup \
27
- CARGO_HOME=/usr/local/cargo \
28
- PATH=/usr/local/cargo/bin:$PATH \
29
- RUST_VERSION=1.75
30
-
31
- RUN set -eux pipefail; \
32
- curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \
33
- sh -s -- -y --no-modify-path --profile minimal --default-toolchain $RUST_VERSION; \
34
- chmod -R a+w $RUSTUP_HOME $CARGO_HOME
35
-
36
- ENV BUNDLE_PATH=/usr/local/gems
37
- RUN set -eux; \
38
- mkdir -p $BUNDLE_PATH; \
39
- chmod -R 777 $BUNDLE_PATH
40
-
41
- COPY entrypoint.sh /usr/local/bin/entrypoint.sh
42
- RUN chmod +x /usr/local/bin/entrypoint.sh
43
- ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
44
- # Build with non-root user because `@npmcli/promise-spawn` sets `uid` and `gid` to cwd owner when the current user is root.
45
- # This permission demotion results in EACCES error at reading `$HOME/.node_modules` in `resolve` package, which is used by `@rollup/plugin-node-resolve`.
46
- # * https://github.com/npm/cli/blob/32336f6efe06bd52de1dc67c0f812d4705533ef2/node_modules/%40npmcli/promise-spawn/lib/index.js#L13
47
- RUN adduser --disabled-password --gecos '' me
@@ -1,7 +0,0 @@
1
- #!/bin/bash
2
-
3
- set -e
4
-
5
- [ ! -z "${RUBYWASM_UID+x}" ] && usermod --uid "$RUBYWASM_UID" --non-unique me
6
- [ ! -z "${RUBYWASM_GID+x}" ] && groupmod --gid "$RUBYWASM_GID" --non-unique me
7
- exec gosu me "$@"