ferripfs-config 0.1.0

IPFS node configuration types, compatible with Kubo config format
Documentation
  • Coverage
  • 73.76%
    194 out of 263 items documented0 out of 28 items with examples
  • Size
  • Source code size: 69.8 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 19.59 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 36s Average build duration of successful builds.
  • all releases: 36s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • dpp

ferripfs-config

IPFS node configuration types, compatible with Kubo's config format.

Note: This crate is part of ferripfs, a Rust port of Kubo (the Go IPFS implementation). The configuration format matches Kubo's config documentation.

Features

  • Full Kubo Compatibility: Same JSON config format as Kubo
  • Type-Safe Access: Strongly typed configuration sections
  • Validation: Config validation with helpful error messages
  • Key-Value Access: Get/set values by dot-separated paths

Usage

use ferripfs_config::Config;

// Parse configuration
let config = Config::parse(json_string)?;

// Access typed fields
println!("Peer ID: {}", config.identity.peer_id);
println!("API Address: {:?}", config.addresses.api);

// Get/set by key path
let value = config.get_key("Swarm.ConnMgr.HighWater");
config.set_key("Gateway.HTTPHeaders.Access-Control-Allow-Origin", json!(["*"]))?;

// Validate configuration
let warnings = config.validate()?;

Configuration Sections

  • Identity - Node identity (PeerID, private key)
  • Addresses - API, Gateway, Swarm addresses
  • Datastore - Storage backend configuration
  • Swarm - Connection manager settings
  • Bootstrap - Initial peers to connect to
  • Gateway - HTTP gateway settings
  • Routing - DHT and content routing
  • Pinning - Remote pinning services

License

Dual-licensed under MIT and Apache-2.0.