diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3ca43c6cc0..1d03bd8401 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -169,11 +169,20 @@ jobs: - name: wasm32 build (iroh-relay) run: cargo build --target wasm32-unknown-unknown -p iroh-relay --no-default-features + - name: wasm32 build (iroh-net-report) + run: cargo build --target wasm32-unknown-unknown -p iroh-net-report --no-default-features + # If the Wasm file contains any 'import "env"' declarations, then # some non-Wasm-compatible code made it into the final code. - name: Ensure no 'import "env"' in iroh-relay Wasm run: | ! wasm-tools print --skeleton target/wasm32-unknown-unknown/debug/iroh_relay.wasm | grep 'import "env"' + + # If the Wasm file contains any 'import "env"' declarations, then + # some non-Wasm-compatible code made it into the final code. + - name: Ensure no 'import "env"' in iroh-net-report Wasm + run: | + ! wasm-tools print --skeleton target/wasm32-unknown-unknown/debug/iroh_net_report.wasm | grep 'import "env"' check_semver: diff --git a/iroh-net-report/Cargo.toml b/iroh-net-report/Cargo.toml index 1467df1d04..b28bd2d1d8 100644 --- a/iroh-net-report/Cargo.toml +++ b/iroh-net-report/Cargo.toml @@ -12,6 +12,9 @@ keywords = ["networking"] # Sadly this also needs to be updated in .github/workflows/ci.yml rust-version = "1.81" +[lib] +crate-type = ["lib", "cdylib"] # cdylib is needed for Wasm support + [lints] workspace = true diff --git a/iroh-relay/Cargo.toml b/iroh-relay/Cargo.toml index 6009bb18bb..984bd66536 100644 --- a/iroh-relay/Cargo.toml +++ b/iroh-relay/Cargo.toml @@ -10,6 +10,9 @@ repository = "https://github.com/n0-computer/iroh" keywords = ["networking", "holepunching", "p2p"] rust-version = "1.81" +[lib] +crate-type = ["lib", "cdylib"] # cdylib is needed for Wasm support + [lints] workspace = true