Skip to content

Commit

Permalink
feat: small wasm support
Browse files Browse the repository at this point in the history
  • Loading branch information
driftluo committed Oct 24, 2024
1 parent 25e3736 commit 51f5714
Show file tree
Hide file tree
Showing 45 changed files with 538 additions and 320 deletions.
102 changes: 78 additions & 24 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion db/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ ckb-app-config = { path = "../util/app-config", version = "= 0.119.0-pre" }
ckb-logger = { path = "../util/logger", version = "= 0.119.0-pre" }
ckb-error = { path = "../error", version = "= 0.119.0-pre" }
libc = "0.2"
rocksdb = { package = "ckb-rocksdb", version ="=0.21.1", features = ["snappy"], default-features = false }
rocksdb = { package = "ckb-rocksdb", version = "=0.21.1", features = [
"snappy",
], default-features = false }
ckb-db-schema = { path = "../db-schema", version = "= 0.119.0-pre" }

[dev-dependencies]
Expand Down
16 changes: 13 additions & 3 deletions network/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,32 @@ bs58 = { version = "0.5.0", optional = true }
sentry = { version = "0.34.0", optional = true }
faster-hex = { version = "0.6", optional = true }
ckb-hash = { path = "../util/hash", version = "= 0.119.0-pre" }
secp256k1 = { version = "0.29", features = ["recovery"], optional = true }
secp256k1 = { version = "0.30", features = ["recovery"], optional = true }
trust-dns-resolver = { version = "0.23", optional = true }
snap = "1"
ckb-types = { path = "../util/types", version = "= 0.119.0-pre" }
ipnetwork = "0.20"
serde_json = "1.0"
bloom-filters = "0.1"
ckb-spawn = { path = "../util/spawn", version = "= 0.119.0-pre" }
socket2 = "0.5"
bitflags = "1.0"
p2p = { version = "0.6.2", package = "tentacle", default-features = false }

p2p = { version = "0.6.1", package = "tentacle", features = [
[target.'cfg(not(target_family = "wasm"))'.dependencies]
p2p = { version = "0.6.2", package = "tentacle", features = [
"upnp",
"parking_lot",
"openssl-vendored",
"ws",
] }
socket2 = "0.5"

[target.'cfg(target_family = "wasm")'.dependencies]
p2p = { version = "0.6.2", package = "tentacle", default-features = false, features = [
"wasm-timer",
] }


[features]
with_sentry = ["sentry"]
with_dns_seeding = ["bs58", "faster-hex", "trust-dns-resolver", "secp256k1"]
Expand All @@ -55,6 +64,7 @@ num_cpus = "1.10"
ckb-systemtime = { path = "../util/systemtime", version = "= 0.119.0-pre", features = [
"enable_faketime",
] }
ckb-app-config = { path = "../util/app-config", version = "= 0.119.0-pre" }

[[bench]]
name = "peer_store"
Expand Down
4 changes: 2 additions & 2 deletions network/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ pub use crate::{
peer_registry::PeerRegistry,
peer_store::Score,
protocols::{
identify::Flags, support_protocols::SupportProtocols, CKBProtocol, CKBProtocolContext,
CKBProtocolHandler, PeerIndex,
identify::Flags, support_protocols::SupportProtocols, BoxedCKBProtocolContext, CKBProtocol,
CKBProtocolContext, CKBProtocolHandler, PeerIndex,
},
};
pub use p2p::{
Expand Down
Loading

0 comments on commit 51f5714

Please sign in to comment.