File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
packages/npm-packages/ruby-wasm-wasi Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -31,5 +31,15 @@ wit-bindgen js \
31
31
wasm-opt --strip-debug " $ruby_root /usr/local/bin/ruby" -o " $dist_dir /ruby.wasm"
32
32
cp " $ruby_root /usr/local/bin/ruby" " $dist_dir /ruby.debug.wasm"
33
33
34
+ # Build +stdlib versions (removing files that are not used in normal use cases)
35
+ workdir=" $( mktemp -d) "
36
+ cp -R " $ruby_root " " $workdir /ruby-root"
37
+ rm -rf $workdir /ruby-root/usr/local/include
38
+ rm -f $workdir /ruby-root/usr/local/lib/libruby-static.a
39
+ rm -f $workdir /ruby-root/usr/local/bin/ruby
40
+ wasi-vfs pack " $dist_dir /ruby.wasm" --mapdir /usr::$workdir /ruby-root/usr -o " $dist_dir /ruby+stdlib.wasm"
41
+ wasi-vfs pack " $dist_dir /ruby.debug.wasm" --mapdir /usr::$workdir /ruby-root/usr -o " $dist_dir /ruby.debug+stdlib.wasm"
42
+
43
+
34
44
mkdir " $dist_dir /bindgen"
35
45
cp $( find " $package_dir /src/bindgen" -name " *.js" -or -name " *.d.ts" ) " $dist_dir /bindgen"
You can’t perform that action at this time.
0 commit comments