Skip to content

Commit 47a775d

Browse files
authored
Add wasm-ext-transport (#1070)
* Add wasm-ext-transport * Fix paths * Adjust listen_on to return an Iterator * Adjust read() to produce Iterator * Remove map_err when possible * Cargo fmt * Adjust errors as well * Small comment fix * Revert "Adjust errors as well" This reverts commit 97eb514. * More dev on Debug * Differentiate based on error
1 parent ce4ca3c commit 47a775d

File tree

3 files changed

+540
-1
lines changed

3 files changed

+540
-1
lines changed

Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ libp2p-core = { version = "0.7.0", path = "./core" }
3030
libp2p-core-derive = { version = "0.7.0", path = "./misc/core-derive" }
3131
libp2p-secio = { version = "0.7.0", path = "./protocols/secio", default-features = false }
3232
libp2p-uds = { version = "0.7.0", path = "./transports/uds" }
33+
libp2p-wasm-ext = { version = "0.1.0", path = "./transports/wasm-ext" }
3334
libp2p-websocket = { version = "0.7.0", path = "./transports/websocket", optional = true }
3435
libp2p-yamux = { version = "0.7.0", path = "./muxers/yamux" }
3536
parking_lot = "0.7"
@@ -76,5 +77,6 @@ members = [
7677
"transports/ratelimit",
7778
"transports/tcp",
7879
"transports/uds",
79-
"transports/websocket"
80+
"transports/websocket",
81+
"transports/wasm-ext"
8082
]

transports/wasm-ext/Cargo.toml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[package]
2+
name = "libp2p-wasm-ext"
3+
version = "0.1.0"
4+
authors = ["Pierre Krieger <[email protected]>"]
5+
edition = "2018"
6+
description = "Allows passing in an external transport in a WASM environment"
7+
license = "MIT"
8+
repository = "https://github.com/libp2p/rust-libp2p"
9+
keywords = ["peer-to-peer", "libp2p", "networking"]
10+
categories = ["network-programming", "asynchronous"]
11+
12+
[dependencies]
13+
futures = "0.1"
14+
js-sys = "0.3.19"
15+
libp2p-core = { version = "0.7.0", path = "../../core" }
16+
send_wrapper = "0.2.0"
17+
tokio-io = "0.1"
18+
wasm-bindgen = "0.2.42"
19+
wasm-bindgen-futures = "0.3.19"

0 commit comments

Comments
 (0)