diff --git a/crates/clone_to_owned/Cargo.toml b/crates/clone_to_owned/Cargo.toml index ff44da2..3c89002 100644 --- a/crates/clone_to_owned/Cargo.toml +++ b/crates/clone_to_owned/Cargo.toml @@ -4,6 +4,8 @@ version = "2.2.1" edition = "2018" description = "Util traits to represent something that can be made owned and change type at the same time." license = "Apache-2.0" +documentation = "https://docs.rs/librqbit-clone-to-owned" +readme = "README.md" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/crates/librqbit/Cargo.toml b/crates/librqbit/Cargo.toml index 3bc765f..e5e882c 100644 --- a/crates/librqbit/Cargo.toml +++ b/crates/librqbit/Cargo.toml @@ -5,7 +5,7 @@ authors = ["Igor Katson "] edition = "2018" description = "The main library used by rqbit torrent client. The binary is just a small wrapper on top of it." license = "Apache-2.0" -documentation = "https://docs.rs/librqbit-dht" +documentation = "https://docs.rs/librqbit" repository = "https://github.com/ikatson/rqbit" readme = "README.md" diff --git a/crates/librqbit/README.md b/crates/librqbit/README.md deleted file mode 120000 index 7703388..0000000 --- a/crates/librqbit/README.md +++ /dev/null @@ -1,40 +0,0 @@ -# librqbit - -A torrent library 100% written in rust - -## Basic example -This is a simple program on how to use this library -This program will just download a simple torrent file with a Magnet link - -```rust -use std::error::Error; -use std::path::PathBuf; -use librqbit::session::{AddTorrentResponse, Session}; -use librqbit::spawn_utils::BlockingSpawner; - -const MAGNET_LINK: &str = "magnet:?..."; // Put your magnet link here - -#[tokio::main] -async fn main() -> Result<(), Box>{ - - // Create the session - let session = Session::new("C:\\Anime".parse().unwrap(), BlockingSpawner::new(false)).await?; - - // Add the torrent to the session - let handle = match session.add_torrent(MAGNET_LINK, None).await { - Ok(AddTorrentResponse::Added(handle)) => { - Ok(handle) - }, - Err(e) => { - eprintln!("Something goes wrong when downloading torrent : {:?}", e); - Err(()) - } - _ => Err(()) - }.expect("Failed to add torrent to the session"); - - // Wait until the download is completed - handle.wait_until_completed().await?; - - Ok(()) -} -```