Skip to content

How to Send Data from Rust to JS #6055

Closed Answered by Zedonboy
Zedonboy asked this question in Q&A
Jun 10, 2025 · 2 comments · 11 replies
Discussion options

You must be logged in to vote

I Found a Solution.

  1. Js and Rust libp2p subsytems are not compatible. You use 1 runtime for all your node types Listener and Dialer.
  2. but if you must use JS, then use Rust Wasm
  3. Io(Custom { kind: UnexpectedEof, error: Eof { name: "array", expect: Small(1) } }) } Error in my case means that the Receiver dnt send back a response.

If you get this error, make sure they are using the StreamProtocol name and make sure both nodes are recieving Outbound and Inbound Events.

Thank you for your response.
@jxs @elenaf9

Replies: 2 comments 11 replies

Comment options

You must be logged in to vote
5 replies
@Zedonboy
Comment options

@elenaf9
Comment options

@Zedonboy
Comment options

@elenaf9
Comment options

@Zedonboy
Comment options

Comment options

You must be logged in to vote
6 replies
@elenaf9
Comment options

@Zedonboy
Comment options

@Zedonboy
Comment options

@Zedonboy
Comment options

Answer selected by Zedonboy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants