diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c80bb3f..4dc4f6c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -36,3 +36,15 @@ jobs: run: cargo run --package bbuilder run examples/input_polygon.json --dry-run - name: Test Ethereum example run: cargo run --package bbuilder run examples/input_ethereum.json --dry-run + + test-wasm-build: + name: Test WASM build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + target: wasm32-unknown-unknown + - name: Build catalog for WASM + run: cargo build --target wasm32-unknown-unknown -p catalog diff --git a/Cargo.lock b/Cargo.lock index b120236..4aa2bb1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1147,7 +1147,7 @@ dependencies = [ "askama", "cosmos-keys", "eyre", - "reqwest", + "getrandom 0.2.16", "serde", "serde_json", "spec", @@ -1674,15 +1674,6 @@ dependencies = [ "serde", ] -[[package]] -name = "encoding_rs" -version = "0.8.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" -dependencies = [ - "cfg-if", -] - [[package]] name = "enum-ordinalize" version = "4.3.2" @@ -2313,11 +2304,9 @@ dependencies = [ "percent-encoding", "pin-project-lite", "socket2", - "system-configuration", "tokio", "tower-service", "tracing", - "windows-registry", ] [[package]] @@ -3701,11 +3690,8 @@ checksum = "9d0946410b9f7b082a427e4ef5c8ff541a88b357bc6c637c40db3a68ac70a36f" dependencies = [ "base64", "bytes", - "encoding_rs", - "futures-channel", "futures-core", "futures-util", - "h2", "http", "http-body", "http-body-util", @@ -3715,7 +3701,6 @@ dependencies = [ "hyper-util", "js-sys", "log", - "mime", "native-tls", "percent-encoding", "pin-project-lite", @@ -4489,27 +4474,6 @@ dependencies = [ "syn 2.0.112", ] -[[package]] -name = "system-configuration" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" -dependencies = [ - "bitflags", - "core-foundation 0.9.4", - "system-configuration-sys", -] - -[[package]] -name = "system-configuration-sys" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4" -dependencies = [ - "core-foundation-sys", - "libc", -] - [[package]] name = "tap" version = "1.0.1" @@ -5306,17 +5270,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" -[[package]] -name = "windows-registry" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02752bf7fbdcce7f2a27a742f798510f3e5ad88dbe84871e5168e2120c3d5720" -dependencies = [ - "windows-link", - "windows-result", - "windows-strings", -] - [[package]] name = "windows-result" version = "0.4.1" diff --git a/Cargo.toml b/Cargo.toml index 1259393..3e2d440 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -39,3 +39,4 @@ reqwest = { version = "0.12", default-features = false } jsonrpsee = { version = "0.24", features = ["server", "ws-client", "http-client", "macros"] } tracing = "0.1" tracing-subscriber = "0.3" +getrandom = { version = "0.2", features = ["js"] } diff --git a/crates/catalog/Cargo.toml b/crates/catalog/Cargo.toml index 81a1898..dc4db52 100644 --- a/crates/catalog/Cargo.toml +++ b/crates/catalog/Cargo.toml @@ -12,4 +12,4 @@ serde_json.workspace = true askama.workspace = true template.workspace = true cosmos-keys.workspace = true -reqwest = { version = "0.12", features = ["blocking"] } +getrandom.workspace = true