Skip to content

Commit 63dbb60

Browse files
Distribute ruby.wasm binaries with/without debuginfo in a package
1 parent 0ac3cf1 commit 63dbb60

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

Rakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ BUILDS = [
3535

3636
NPM_PACKAGES = [
3737
{ name: "ruby-head-wasm-emscripten", build: "head-wasm32-unknown-emscripten-full" },
38-
{ name: "ruby-head-wasm-wasi", build: "head-wasm32-unknown-wasi-full-js" },
38+
{ name: "ruby-head-wasm-wasi", build: "head-wasm32-unknown-wasi-full-js-debug" },
3939
]
4040

4141
WAPM_PACKAGES = [

packages/npm-packages/ruby-wasm-wasi/build-package.sh

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ ruby_root="$1"
1414
package_dir="$(cd "$(dirname "$0")" && pwd)"
1515
dist_dir="$package_dir/dist"
1616
repo_dir="$package_dir/../../../"
17-
BUILD_WITH_DEBUG="${BUILD_WITH_DEBUG-""}"
1817

1918
rm -rf "$dist_dir"
2019

@@ -29,11 +28,8 @@ wit-bindgen js \
2928
npx tsc --build
3029
)
3130

32-
if [ -z "$BUILD_WITH_DEBUG" ]; then
33-
wasm-opt --strip-debug "$ruby_root/usr/local/bin/ruby" -o "$dist_dir/ruby.wasm"
34-
else
35-
cp "$ruby_root/usr/local/bin/ruby" "$dist_dir/ruby.wasm"
36-
fi
31+
wasm-opt --strip-debug "$ruby_root/usr/local/bin/ruby" -o "$dist_dir/ruby.wasm"
32+
cp "$ruby_root/usr/local/bin/ruby" "$dist_dir/ruby.debug.wasm"
3733

3834
mkdir "$dist_dir/bindgen"
3935
cp $(find "$package_dir/src/bindgen" -name "*.js" -or -name "*.d.ts") "$dist_dir/bindgen"

0 commit comments

Comments
 (0)