Rust IPFS API Client
A client library for the IPFS API.
This library allows you to use the local IPFS daemon from Rust.
Usage
[]
= "0.2"
Examples
Reading a file from IPFS
Here's an example that gets the contents of a file from IPFS and displays it.
let api = new;
let bytes = api.cat.unwrap;
let data = String from_utf8.unwrap;
println!;
The code gets the content of the IPFS hash and displays "Hello World".
Subsribing to messages on IPFS Pubsub
let api = new;
let messages = api.pubsub_subscribe.unwrap;
for message in messages
Implemented Functionality
- Getting file contents from IPFS (cat)
- Pubsub
- IPNS publish and resolve
- Object/Hash stats (size, etc.)
- Version information of the daemon
- Pinning and unpinning files
- Shut down IPFS daemon