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

Make the calling processes of wasm and golang consistent #25

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from 4 commits
Commits
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
20 changes: 15 additions & 5 deletions bindings/wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,32 @@ edition = "2021"
publish = false

[lib]
crate-type = ["cdylib"]
crate-type = ["cdylib","rlib"]

[dependencies]
zklink_sdk_signers = { path = "../../signers" }
zklink_sdk_types = { path = "../../types" }
zklink_sdk_provider = { path = "../../provider" }
zklink_sdk_interface = { path = "../../interface" }
serde_json = "1.0"
wasm-bindgen = { version = "0.2.87",features = ["serde-serialize"] }
serde-wasm-bindgen = "0.5"
getrandom = { version = "0.2.10", features = ["js"] }
web-sys = "0.3"
hex = "0.4.3"
reqwest = { version = "0.11", default-features = false, features = ["blocking", "json", "rustls-tls"] }

[target.'cfg(target_arch = "wasm32")'.dependencies]
wasm-bindgen-futures = "0.4"
jsonrpsee = { version = "0.20.1", features = ["macros","jsonrpsee-types","client-core"] }
uuid = "0.8"

[features]
default = []
ffi = []

[dev-dependencies]
actix-rt = "2.7"
actix-web = "4.2"
futures = "0.3"
tokio = { version = "1", features = ["full"] }
wasm-bindgen-test = "0.3"

[package.metadata.wasm-pack.profile.release]
wasm-opt = false
80 changes: 0 additions & 80 deletions bindings/wasm/src/crypto.rs

This file was deleted.

55 changes: 0 additions & 55 deletions bindings/wasm/src/error.rs

This file was deleted.

9 changes: 5 additions & 4 deletions bindings/wasm/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#[cfg(target_arch = "wasm32")]
pub mod crypto;
// #[cfg(not(target_arch = "wasm32"))]
#![cfg(target_arch = "wasm32")]
pub mod rpc_client;
pub mod rpc_type_converter;
pub mod signer;
pub mod tx_types;
// pub mod wallet;
// #[cfg(not(target_arch = "wasm32"))]
// pub mod error;

extern crate getrandom;
Loading
Loading