#tetcoin #tetsy-libp2p #networking #crypto

wasm-ext

Allows passing in an external transport in a WASM environment

Show the crate…

1 unstable release

0.27.0 Mar 12, 2021
0.0.0 Mar 11, 2021

#11 in #tetsy-libp2p


Used in tetsy-libp2p

MIT license

475KB
8K SLoC

wasm-ext

Implementation of the tetsy-libp2p Transport trait for external transports.

This Transport is used in the context of WASM to allow delegating the transport mechanism to the code that uses tetsy-libp2p, as opposed to inside of tetsy-libp2p itself.

Note: This only allows transports that produce a raw stream with the remote. You couldn't, for example, pass an implementation QUIC.

Usage

Call new() with a JavaScript object that implements the interface described in the ffi module.


lib.rs:

Implementation of the tetsy-libp2p Transport trait for external transports.

This Transport is used in the context of WASM to allow delegating the transport mechanism to the code that uses tetsy-libp2p, as opposed to inside of tetsy-libp2p itself.

Note: This only allows transports that produce a raw stream with the remote. You couldn't, for example, pass an implementation QUIC.

Usage

Call new() with a JavaScript object that implements the interface described in the ffi module.

Dependencies

~9–14MB
~297K SLoC