Open hadim opened 8 months ago
Happy to give it a shot with some help/guidance.
The basic structure would be to allow the IrohNode
(https://github.com/n0-computer/iroh-ffi/blob/main/src/node.rs#L185) be either a full node, or a client connection, established like here: https://github.com/n0-computer/iroh/blob/main/iroh/src/commands.rs#L148
eg change node: Node<iroh::bytes::store::flat::Store>,
to be
enum InnerNode {
Full(Node<iroh::bytes::store::flat::Store>),
Client(iroh::client::quic::Iroh),
}
I gave it a quick shot, but iroh_quic_connect
is not exported. I tried to export it by tweaking the iroh repo, but I am running into a bunch of error in cascades when editing lib.rs
with pub mod
and pub use
.
My use case is for the Python binding but I guess it could be useful for other bindings as well.
Discord chat: https://discord.com/channels/1161119546170687619/1161119546644627528/1199697069686931508