Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(wasm): add beerus-web wasm library #756

Merged
merged 61 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from 54 commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
db5f608
feat(wasm): wasm support preparations
sergey-melnychuk Aug 29, 2024
0173c67
feat(wasm): add `beerus-web` wasm lib
sergey-melnychuk Aug 29, 2024
38e304a
feat(wasm/cors): add simple cors proxy utility
sergey-melnychuk Aug 29, 2024
b91e498
feat(wasm/cors): add demo web app with beerus-web
sergey-melnychuk Aug 29, 2024
9f4b80f
style: fmt
sergey-melnychuk Aug 29, 2024
470f69c
chore(ci/wasm): enable wasm check job
sergey-melnychuk Aug 29, 2024
ba95734
chore(ci): bump `typos` version
sergey-melnychuk Aug 29, 2024
3251d1b
chore(deps): align `ureq`
sergey-melnychuk Aug 29, 2024
162561d
feat(rpc): extract http client adapter
sergey-melnychuk Aug 29, 2024
1c2c709
feat(gen/rpc): use http client adapters
sergey-melnychuk Aug 29, 2024
78b5004
chore: unified http transport
sergey-melnychuk Aug 30, 2024
2132514
chore: try bridge non-async code into wasm
sergey-melnychuk Aug 30, 2024
7824ad0
chore: clean up `Http` impl
sergey-melnychuk Sep 3, 2024
1039651
chore: clean up wasm && web
sergey-melnychuk Sep 3, 2024
166ee5b
fix(wasm/deps): undo breaking bump of `once_cell`
sergey-melnychuk Sep 18, 2024
d2d65dc
chore(wasm): update wasm exe::call arguments
sergey-melnychuk Sep 18, 2024
c0f0894
fix(wasm/time): fix the time issue
sergey-melnychuk Sep 21, 2024
8542a9f
chore: use extracted http transport
sergey-melnychuk Sep 21, 2024
4a6f401
chore(bin): use extracted http transport
sergey-melnychuk Sep 21, 2024
6004ed2
chore(examples): use extracted http transport
sergey-melnychuk Sep 21, 2024
8310122
chore(tests): use extracted http transport
sergey-melnychuk Sep 21, 2024
f6f9511
fix(tests): proper block data
sergey-melnychuk Sep 21, 2024
5a5d7ce
chore(gen): align client per-target
sergey-melnychuk Sep 21, 2024
8272ff6
chore: detect & mark the wasm32/usize problem
sergey-melnychuk Sep 21, 2024
4386f3e
feat(wasm): run beerus in a web worker contex
sergey-melnychuk Sep 21, 2024
8a7b943
chore(wasm/docs): update readme & build script
sergey-melnychuk Sep 21, 2024
26f4846
chore(wasm/deps): align dependencies
sergey-melnychuk Sep 21, 2024
def0cfc
style: fmt
sergey-melnychuk Sep 21, 2024
fd51a20
chore(ci/typos): skip file web/app.js
sergey-melnychuk Sep 21, 2024
785664a
style: clippy
sergey-melnychuk Sep 21, 2024
529e526
chore(ci/typos): ignore "wrk"
sergey-melnychuk Sep 21, 2024
fa36c13
chore(ci): free some disk space
sergey-melnychuk Sep 21, 2024
f050a0c
chore: remove comment
sergey-melnychuk Sep 22, 2024
e1dc56d
chore(web): remove examples
sergey-melnychuk Sep 22, 2024
7710b4d
feat(config): distinct client & server config
sergey-melnychuk Sep 22, 2024
4efe24c
feat(web/config): use client-only config
sergey-melnychuk Sep 22, 2024
d4c178c
feat(eth): drop `Arc<Mutex<>>` wrapper from Helios
sergey-melnychuk Sep 22, 2024
38bff77
feat(exe): extract method `Client::execute`
sergey-melnychuk Sep 22, 2024
3af37c8
chore(web): cleanup logging
sergey-melnychuk Sep 22, 2024
497aad7
style: clippy
sergey-melnychuk Sep 22, 2024
aa5da30
feat(web): extract and use `Beerus` object
sergey-melnychuk Sep 23, 2024
ea1e0c7
chore: remove stale TODOs
sergey-melnychuk Sep 23, 2024
cb70467
chore(web/docs): update readme
sergey-melnychuk Sep 23, 2024
6f818cb
chore: make generic blocking http unavailable
sergey-melnychuk Sep 24, 2024
cce3ea4
chore(web/proxt): cleanup
sergey-melnychuk Sep 24, 2024
e87be3c
chore(web): align logging
sergey-melnychuk Sep 24, 2024
15e67a5
chore(web/proxy): lightweight logging
sergey-melnychuk Sep 24, 2024
1535cb4
feat(web): add simple web UI
sergey-melnychuk Sep 24, 2024
3d8e542
feat(web): check `chainId` in `Beerus` ctor
sergey-melnychuk Sep 24, 2024
037baed
chore: use variables for debug info
sergey-melnychuk Sep 24, 2024
561a747
chore(tests): use `Client` with generic param
sergey-melnychuk Sep 24, 2024
feb684f
feat(tests): stop katana when dropped
sergey-melnychuk Sep 24, 2024
8f93c1e
style: fmt
sergey-melnychuk Sep 24, 2024
a97cbae
feat(web): editable requests && error processing
sergey-melnychuk Sep 24, 2024
3ec2ba7
chore(tests): extract module `ctx`
sergey-melnychuk Sep 25, 2024
35729fa
chore(tests): extract module `err`
sergey-melnychuk Sep 25, 2024
2b4fc0b
chore(tests): extract `ctx` and `err`
sergey-melnychuk Sep 25, 2024
d65ced9
chore(tests): use extracted `err`
sergey-melnychuk Sep 25, 2024
d3f8dfd
style: fmt
sergey-melnychuk Sep 25, 2024
3ee85b5
chore(deps): remove commented entries
sergey-melnychuk Sep 25, 2024
9824e39
chore(web/proxy): fix package license
sergey-melnychuk Sep 25, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 14 additions & 13 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,36 +14,37 @@ concurrency:
cancel-in-progress: true

jobs:
test:
if: ${{ !startsWith(github.head_ref, 'dependabot/') }}
quick-check:
if: startsWith(github.head_ref, 'dependabot/')
runs-on: ubuntu-latest
env:
BEERUS_TEST_RUN: 1
BEERUS_TEST_STARKNET_URL: https://starknet-mainnet.g.alchemy.com/starknet/version/rpc/v0_7/${{ secrets.ALCHEMY_KEY }}
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: cargo test
- run: cargo check --tests --examples

check:
if: startsWith(github.head_ref, 'dependabot/')
test:
if: ${{ !startsWith(github.head_ref, 'dependabot/') }}
runs-on: ubuntu-latest
env:
BEERUS_TEST_RUN: 1
BEERUS_TEST_STARKNET_URL: https://starknet-mainnet.g.alchemy.com/starknet/version/rpc/v0_7/${{ secrets.ALCHEMY_KEY }}
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: cargo check --tests --examples
- run: rm -rf /opt/hostedtoolcache
- run: cargo test

check-wasm:
if: false ## disabled until wasm effort is in progress
wasm:
if: ${{ !startsWith(github.head_ref, 'dependabot/') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: rustup target add wasm32-unknown-unknown
- run: cargo check --target wasm32-unknown-unknown --no-default-features
- run: cd web/beerus-web && cargo check --target wasm32-unknown-unknown

clippy:
if: ${{ !startsWith(github.head_ref, 'dependabot/') }}
Expand Down Expand Up @@ -80,6 +81,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: crate-ci/typos@v1.21.0
- uses: crate-ci/typos@v1.24.1
with:
files: .
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,8 @@ target/
node_modules

tmp/

pkg/
dist/
node_modules/
.parcel-cache/
Loading
Loading