Rust IPFS Logo Rust IPFS

The performance and efficiency of Rust, and the decentralized power of IPFS.

Together at last.

Get Started

UnixFS Support


Easily encode your content and add, get, and cat to your heart's content

Global Swarming


Connect to the global IPFS network and discover content via bootstrap peers

Canonical HTTP APIs


If your application already uses the IPFS HTTP APIs, you can easily switch to Rust IPFS

Getting Started

First, add ipfs and tokio to your Cargo.toml file:

ipfs = "0.2.1"
tokio = { version = "0.2", features = ["full"] }

Then, in your src/main.rs:

use ipfs::{Ipfs, IpfsOptions, IpfsPath, TestTypes, UninitializedIpfs};
use std::process::exit;
use tokio::{io::AsyncWriteExt, stream::StreamExt};

async fn main() {
    // Initialize an in-memory repo and start a daemon.
    let opts = IpfsOptions::inmemory_with_generated_keys();
    let (ipfs, fut): (Ipfs<TestTypes>, _) = UninitializedIpfs::new(opts).start().await.unwrap();

    // Spawn the background task

    // Restore the default bootstrappers to enable content discovery

    // Get the IPFS README
    let path = "/ipfs/QmQPeNsJPyVWPFDVHb77w8G42Fvo15z4bG2X8D2GhfbSXc/readme"

    let stream = ipfs.cat_unixfs(path, None).await.unwrap_or_else(|e| {
        eprintln!("Error: {}", e);


    let mut stdout = tokio::io::stdout();

    loop {
        match stream.next().await {
            Some(Ok(bytes)) => {
            Some(Err(e)) => {
                eprintln!("Error: {}", e);
            None => break,

Further Reading

These are some extra resources to get you started with specific use-cases of Rust IPFS:

This project is supported by

Equilibrium Protocol Labs Web3 Foundation

Rust IPFS is supported by Equilibrium, Protocol Labs, the Web3 Foundation, and YOU. If you find this work useful, please consider becoming a financial contributor on OpenCollective.