Skip to content
This repository was archived by the owner on Oct 23, 2022. It is now read-only.

Using rust-ipfs as a library #186

Closed
dadepo opened this issue Jun 11, 2020 · 2 comments
Closed

Using rust-ipfs as a library #186

dadepo opened this issue Jun 11, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@dadepo
Copy link

dadepo commented Jun 11, 2020

This is not a feature request but a request for clarification on the usage of rust-ipfs as a library

Currently I am interacting with IPFS by calling out to an installed binary.

So far, here are the commands I need for my interactions:

//1
// Ensure ipfs is started with --enable-pubsub-experiment and --enable-namesys-pubsub
//2
ipfs add -r /path_to_dir 
//3
ipfs name publish --key=hash-public-key cid_to_publish
//4
ipfs get "ipns/path"--output=destination_path

My questions now are:

  1. I know rust-ipfs is pre-alpha, but does it currently support --enable-pubsub-experiment and --enable-namesys-pubsub?

  2. Does it also currently support adding a directory, publishing to ipns and requesting from ipns?

  3. Would there be a theoretical/real performance benefit of using rust-ipfs as a library compared with interacting with an installed binary?

Thanks!

@dadepo dadepo added the enhancement New feature or request label Jun 11, 2020
@koivunej
Copy link
Collaborator

koivunej commented Jun 11, 2020

Thanks for reaching out!

  1. I know rust-ipfs is pre-alpha, but does it currently support --enable-pubsub-experiment and --enable-namesys-pubsub?

The current build has an equivalent of --enable-pubsub-experiment always on, and in fact, it cannot be turned off via configuration. The inability to configure it off with the #132 makes it so that you cannot connect to go-ipfs 0.5 which is running with --enable-pubsub-experiment.

We currently do not support IPNS at all, so no support for IPNS over pubsub either.

  1. Does it also currently support adding a directory, publishing to ipns and requesting from ipns?

We do not currently have an unixfs importer or the add but we have planned implementing it rather soon. Currently I am working over at the unixfs reading support #172 and /cat is looking ok with #184 which will leave the main library or crate missing out the IpfsPath resolving, which has had some iterations over it. The IpfsPath enhancements should be following rather soon.

I don't think we have any concrete plans for IPNS. On my mind the path has been to first fix the dns story #83 to enable dnslink, then implement keystore management followed by initial work on IPNS over DHT. At that point I expect the libp2p-gossipsub to be compatible with go-ipfs and go-ipfs defaulting to it as well, so the IPNS over pubsub would be next logical step.

We are currently gathering Phase 3 ideas over at #181 but since this issue was already created: Could you open a bit your use case up? Any details would be much appreciated.

  1. Would there be a theoretical/real performance benefit of using rust-ipfs as a library compared with interacting with an installed binary?

At least the theoretical benefit is there but at least for now, it might be non-existent or only caused by the fact that we implement so few features compared to {go,js}-ipfs. In the long run we aim to provide a predictable and trustworthy experience as crate and of course rust and LLVMs optimization capabilities will shine compared to communicating over HTTP when we have the features working.

@dadepo
Copy link
Author

dadepo commented Jun 11, 2020

Thanks for the response. I have enough information to make my decision regarding usage of the current version rust-ipfs. Tnanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants