[][src]Crate ipfs_embed

IpfsEmbed is an embeddable ipfs implementation.

use ipfs_embed::Ipfs;
use ipfs_embed::db::StorageService;
use ipfs_embed::net::{NetworkConfig, NetworkService};
use libipld::DefaultStoreParams;
use std::sync::Arc;
use std::time::Duration;
let config = NetworkConfig::new();
let storage = Arc::new(StorageService::open("/tmp/ipfs-embed").unwrap());
let network = Arc::new(NetworkService::new(config).unwrap());
let ipfs = Ipfs::<DefaultStoreParams, _, _>::new(storage, network, Duration::from_secs(5));

Re-exports

pub use ipfs_embed_core as core;
pub use ipfs_embed_db as db;
pub use ipfs_embed_net as net;

Structs

Ipfs