Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

Commit

Permalink
feat: wasm support (#390)
Browse files Browse the repository at this point in the history
* feat: partial wasm32 support

* make compile for wasm32

* feat: att async-trait attr

* make compatible with wasm

* add type alias for archs

* rustfmt

* add wasm ci

* make compile with wasm-pack test

* make compile with wasm-pack test

* make compile with wasm-pack test

* make compile with wasm-pack test

* ci: disable wasmpack

* feat: use wasm timer delay

* feat: add wasm provider

* rustfmt

* misc refactor

* add wasm example

* make example a directory

* untrack error log

* move profile to root

* fix unused imports

* ci: enable wasm-pack test

* style: unify websocket implementations

* fix: typos

* fix: make policy compatible with wasm target

* chore: do not include ethers-wasm example as top level workspace member

* chore: modify wasm32 dependencies

* chore: make note about getrandom

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
  • Loading branch information
mattsse and gakonst authored Aug 23, 2021
1 parent 8587b3e commit ea56666
Show file tree
Hide file tree
Showing 58 changed files with 5,427 additions and 104 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,47 @@ jobs:
run: cargo fmt --all -- --check
- name: cargo clippy
run: cargo clippy -- -D warnings

wasm:
name: WASM
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v1
- name: Install node
uses: actions/setup-node@v1
with:
node-version: 10
- name: Install rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: wasm32-unknown-unknown
profile: minimal
override: true

- name: Check
uses: actions-rs/cargo@v1
with:
command: check
args: --target wasm32-unknown-unknown

- name: Launch Ganache
run: |
cd examples/ethers-wasm
npm install
npm run ganache &
- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh

- name: Wasm-pack test firefox
run: |
cd examples/ethers-wasm
wasm-pack test --headless --firefox
- name: Wasm-pack test chrome
run: |
cd examples/ethers-wasm
wasm-pack test --headless --chrome
Loading

0 comments on commit ea56666

Please sign in to comment.