-
Please excuse my silliness for asking this question, but I am currently used to the IPFS way of thinking. There is an issue in IPFS where if you were to spin up a separate daemon (RPC endpoint + Blob Repository + Swarm Networking) for every single application, things get out of hand. Thus, there are light-weight RPC wrapper libraries. Where on a machine you would have a central daemon, usually Kubo, running and exposing localhost:5001, and every application on that machine wishes to interact with data within IPFS would only need to load the wrapper and points to the endpoint. Reading through Iroh's examples, I am seeing this: let node = iroh::node::Builder::default().enable_docs().persist(data_root)
.await?
.spawn()
.await?; Which, I assume, creates a new Iroh node, with the blob repo located at |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Not a silly question at all :) If you've played with the iroh CLI at all, you'll see a bunch of things that will feel familiar to you: There's a The CLI does this via a QUIC-based RPC library we built ( Spawning a node and getting a
It really depends on your setup. It should be said that running something like |
Beta Was this translation helpful? Give feedback.
Not a silly question at all :)
If you've played with the iroh CLI at all, you'll see a bunch of things that will feel familiar to you: There's a
iroh start
command that is roughly equivalent toipfs daemon
, and any commands likeiroh blobs add
oriroh blobs get
require that you haveiroh start
running concurrently (unless you runiroh blobs add --start
which will do aniroh start
internally).The CLI does this via a QUIC-based RPC library we built (
quic-rpc
). In fact, in the code example you've posted above, when you access thenode.client()
, that returns you an RPC connection to thenode
(fun fact: In the same process, this connection will be optimized and skip all serialization!).Spawn…