Skip to content

Commit

Permalink
build: add tools for optimizing the Wasm binaries and translating to wat
Browse files Browse the repository at this point in the history
After the addition of the rust-std-static-wasm32-wasi target, we're
able to compile the Rust programs to Wasm binaries. However, we're still
only able to handle the Wasm UDFs in the Text format, so we need a tool
to translate the .wasm files to .wat. Additionally, the .wasm files
generated by default are unnecessarily large, which can be helped
using wasm-opt and wasm-strip.
The tool for translating wasm to wat (wasm2wat), and the tool for
stripping the wasm binaries (wasm-strip) are included in the `wabt`
package, and the optimization tool (wasm-opt) is included in the
`binaryen` package. Both packages are added to install-dependencies.sh

Closes scylladb#13282

[avi: regenerate frozen toolchain]

Closes scylladb#13605
  • Loading branch information
wmitros authored and kbr-scylla committed Apr 25, 2023
1 parent 9a9dbff commit b0fa59b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions install-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ fedora_packages=(
cargo
rapidxml-devel
rust-std-static-wasm32-wasi
wabt
binaryen
)

# lld is not available on s390x, see
Expand Down
2 changes: 1 addition & 1 deletion tools/toolchain/image
Original file line number Diff line number Diff line change
@@ -1 +1 @@
docker.io/scylladb/scylla-toolchain:fedora-37-20230320
docker.io/scylladb/scylla-toolchain:fedora-37-20230424

0 comments on commit b0fa59b

Please sign in to comment.