diff options
| author | Nicholas Rodrigues Lordello <[email protected]> | 2022-05-03 07:59:24 +0200 |
|---|---|---|
| committer | Nicholas Rodrigues Lordello <[email protected]> | 2022-05-03 07:59:24 +0200 |
| commit | 2cf5f650b8fdbd1992f3d65ad6e102087e74f896 (patch) | |
| tree | 7c501fcd82b33a6203cb6b55c4820d698c1d83e5 /.github/workflows/release.yml | |
| parent | 1c13a451bc2e56ce8531d5da683a3c7aa6d4d887 (diff) | |
Use Rust Secp256k1 implementation from RustCrypto project (#92)
This PR ports `hdwallet` to use the `k256` crate - a native Rust implementation of secp256k1 elliptic curve and ECDSA signing.
The motivation for this change is that we can just use the `wasm32-wasi` Rust target without requiring a WASI C toolchain! Notice that the CI no longer requires installing the WASI SDK in order to build the WASI target.
Diffstat (limited to '.github/workflows/release.yml')
| -rw-r--r-- | .github/workflows/release.yml | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cd321bd..8462ede 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,16 +13,12 @@ jobs: - name: Build run: | - curl -sL https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-14/wasi-sdk_14.0_amd64.deb -o /tmp/wasi-sdk.deb - sudo dpkg -i /tmp/wasi-sdk.deb rustup target add wasm32-wasi - CC=/opt/wasi-sdk/bin/clang cargo build --release --target wasm32-wasi + cargo build --release --target wasm32-wasi - name: Optimize run: | - sudo apt-get update && sudo apt-get install binaryen wabt - wasm2wat target/wasm32-wasi/release/hdwallet.wasm | grep -v '^\s*(export "rustsecp256k1_' > target/wasm32-wasi/release/hdwallet.exp.wat - wat2wasm target/wasm32-wasi/release/hdwallet.exp.wat -o target/wasm32-wasi/release/hdwallet.exp.wasm - wasm-opt target/wasm32-wasi/release/hdwallet.exp.wasm -O4 -o target/wasm32-wasi/release/hdwallet.opt.wasm --strip-debug --strip-producers + sudo apt-get update && sudo apt-get install binaryen + wasm-opt target/wasm32-wasi/release/hdwallet.wasm -O4 -o target/wasm32-wasi/release/hdwallet.opt.wasm --strip-debug --strip-producers - name: Release id: create_release |
