Skip to content

Commit e08f9dc

Browse files
committedMar 17, 2025
wasm: allow wasm64. Fixes #100. #build-wasm
1 parent 4cd17c5 commit e08f9dc

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed
 

‎.github/workflows/wasm.yaml

+5-5
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ env:
1212
CARGO_TERM_COLOR: always
1313
RUST_BACKTRACE: 1
1414
RUST_LOG: webbrowser=TRACE
15-
WASM_PACK_VERSION: '0.10.3'
16-
WASM_TARGET: wasm32-unknown-unknown
15+
WASM_PACK_VERSION: '0.13.1'
1716

1817
jobs:
1918
build:
@@ -24,15 +23,16 @@ jobs:
2423
max-parallel: 1
2524
matrix:
2625
rust: [stable, beta]
27-
continue-on-error: ${{ matrix.rust != 'stable' && matrix.rust != 'beta' }}
26+
wasmarch: [wasm32-unknown-unknown]
27+
continue-on-error: ${{ matrix.rust == 'beta' || matrix.wasmarch == 'wasm64-unknown-unknown' }}
2828
steps:
2929
- uses: actions/checkout@v3
3030
name: Checkout
3131
- name: Install rust version
3232
run: |
3333
rustup install ${{ matrix.rust }} --profile minimal
3434
rustup component add --toolchain ${{ matrix.rust }} rustfmt clippy
35-
rustup target add ${{ env.WASM_TARGET }}
35+
rustup target add ${{ matrix.wasmarch }}
3636
3737
# Install wasm-pack
3838
- uses: actions/cache@v3
@@ -65,4 +65,4 @@ jobs:
6565
run: cargo +${{ matrix.rust }} fmt --all -- --check
6666
- name: Lints
6767
if: ${{ matrix.rust == 'stable' || matrix.rust == 'beta' }}
68-
run: cargo +${{ matrix.rust }} clippy --target ${{ env.WASM_TARGET }} -- -D warnings
68+
run: cargo +${{ matrix.rust }} clippy --target ${{ matrix.wasmarch }} -- -D warnings

‎Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ rust-version = "1.60"
1616
log = "0.4"
1717
url = "2"
1818

19-
[target.'cfg(target_arch = "wasm32")'.dependencies.web-sys]
19+
[target.'cfg(target_family = "wasm")'.dependencies.web-sys]
2020
version = "0.3"
2121
features = ['Window']
2222

‎src/wasm.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use crate::{Browser, BrowserOptions, Error, ErrorKind, Result, TargetType};
22

3-
/// Deal with opening a URL in wasm32. This implementation ignores the browser attribute
4-
/// and always opens URLs in the same browser where wasm32 vm is running.
3+
/// Deal with opening a URL in wasm. This implementation ignores the browser attribute
4+
/// and always opens URLs in the same browser where wasm vm is running.
55
pub(super) fn open_browser_internal(
66
_: Browser,
77
target: &TargetType,

0 commit comments

Comments
 (0)