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: Support wasm32 #119

Merged
merged 7 commits into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 13 additions & 1 deletion .github/workflows/wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ jobs:
run: >
cargo add
--path ../crates/atrium-xrpc-client
--no-default-features
- name: Copy pinned dependencies into synthetic crate
run: cp crates/Cargo.lock ci-build/
- name: Add target
Expand All @@ -54,3 +53,16 @@ jobs:
- name: Build for target
working-directory: ./ci-build
run: cargo build --verbose --target ${{ matrix.target }}

tests:
name: Testing with wasm-bindgen-test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Add target
run: rustup target add wasm32-unknown-unknown
- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- run: wasm-pack test --node atrium-api
- run: wasm-pack test --node atrium-xrpc
- run: wasm-pack test --node atrium-xrpc-client
3 changes: 1 addition & 2 deletions .github/workflows/xrpc-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ jobs:
- name: Run tests
run: |
cargo test -p atrium-xrpc-client --lib
cargo test -p atrium-xrpc-client --lib --no-default-features --features=reqwest-native
cargo test -p atrium-xrpc-client --lib --no-default-features --features=reqwest-rustls
cargo test -p atrium-xrpc-client --lib --no-default-features --features=reqwest
cargo test -p atrium-xrpc-client --lib --no-default-features --features=isahc
cargo test -p atrium-xrpc-client --lib --no-default-features --features=surf
cargo test -p atrium-xrpc-client --lib --all-features
Expand Down