Skip to content

Commit

Permalink
cleanup some docs
Browse files Browse the repository at this point in the history
  • Loading branch information
dignifiedquire committed Nov 21, 2024
1 parent 03081d8 commit 9feb3a4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 30 deletions.
3 changes: 1 addition & 2 deletions iroh/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,8 @@ url = { version = "2.5.0", features = ["serde"] }
serde-error = "0.1.3"

[features]
default = ["metrics", "fs-store"]
default = ["metrics"]
metrics = ["iroh-metrics"]
fs-store = []
test = []
discovery-pkarr-dht = ["iroh-net/discovery-pkarr-dht"]
test-utils = ["iroh-net/test-utils"]
Expand Down
30 changes: 2 additions & 28 deletions iroh/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,11 @@
//!
//! ## Example
//!
//! Create a new node and add some data to the blobs store. This data will be
//! available over the network.
//! Create a new node.
//!
//! ```rust
//! # async fn run() -> anyhow::Result<()> {
//! let node = iroh::node::Node::memory().spawn().await?;
//! let client = node.client();
//! let hash = client.blobs().add_bytes(b"some data".to_vec()).await?.hash;
//! println!("hash: {}", hash);
//! let _node = iroh::node::Node::memory().spawn().await?;
//! # Ok(())
//! # }
//! ```
Expand Down Expand Up @@ -45,45 +41,23 @@
//! The client provides access to various subsystems:
//! - [net](crate::client::net):
//! information and control of the iroh network
//! - [blobs](crate::client::blobs):
//! manage and share content-addressed blobs of data
//! - [tags](crate::client::tags):
//! tags to tell iroh what data is important
//! - [gossip](crate::client::gossip):
//! exchange data with other nodes via a gossip protocol
//! - [docs](crate::client::docs):
//! interact with documents and document authors
//!
//! The subsystem clients can be obtained cheaply from the main iroh client.
//! They are also cheaply cloneable and can be shared across threads.
//!
//! So if you have code that only needs to interact with one subsystem, pass
//! it just the subsystem client.
//!
//! ## Remote nodes
//!
//! To obtain a client to a remote node, you can use
//! [connect](crate::client::Iroh::connect_path) to connect to a node running on
//! the same machine, using the given data directory, or
//! [connect_addr](crate::client::Iroh::connect_addr) to connect to a node at a
//! known address.
//!
//! **Important**: the protocol to a remote node is not stable and will
//! frequently change. So the client and server must be running the same version of iroh.
//!
//! ## Reexports
//!
//! The iroh crate re-exports the following crates:
//! - [iroh_base] as [`base`]
//! - [iroh_blobs] as [`blobs`]
//! - [iroh_docs] as [`docs`]
//! - [iroh_gossip] as [`gossip`]
//! - [iroh_net] as [`net`]
//!
//! ## Feature Flags
//!
//! - `metrics`: Enable metrics collection. Enabled by default.
//! - `fs-store`: Enables the disk based storage backend for `iroh-blobs`. Enabled by default.
#![cfg_attr(iroh_docsrs, feature(doc_cfg))]
#![deny(missing_docs, rustdoc::broken_intra_doc_links)]

Expand Down

0 comments on commit 9feb3a4

Please sign in to comment.