Skip to content

Commit

Permalink
Merge pull request #32 from ikatson/cargo-package
Browse files Browse the repository at this point in the history
Update all Cargo.tomls for publishing on crates.io
  • Loading branch information
ikatson authored Nov 15, 2023
2 parents 3e3a3d6 + de8adf5 commit b763f95
Show file tree
Hide file tree
Showing 22 changed files with 191 additions and 125 deletions.
166 changes: 83 additions & 83 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions crates/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
This package is a dependency of [rqbit](https://github.com/ikatson/rqbit) torrent client.
It can be used by itself too. See more [at the rqbit Github page](https://github.com/ikatson/rqbit).
15 changes: 10 additions & 5 deletions crates/bencode/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
[package]
name = "bencode"
version = "0.1.0"
name = "librqbit-bencode"
version = "2.2.1"
edition = "2018"
description = "Bencode serialization and deserialization using Serde"
license = "Apache-2.0"
documentation = "https://docs.rs/librqbit-bencode"
repository = "https://github.com/ikatson/rqbit"
readme = "README.md"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand All @@ -13,7 +18,7 @@ sha1-rust = ["sha1w/sha1-rust"]

[dependencies]
serde = {version = "1", features=["derive"]}
buffers = {path = "../buffers"}
clone_to_owned = {path = "../clone_to_owned"}
buffers = {path = "../buffers", package="librqbit-buffers", version = "2.2.1"}
clone_to_owned = {path = "../clone_to_owned", package="librqbit-clone-to-owned", version = "2.2.1"}
anyhow = "1"
sha1w = {path="../sha1w", default-features=false}
sha1w = {path="../sha1w", default-features=false, package="librqbit-sha1-wrapper", version="2.2.1"}
1 change: 1 addition & 0 deletions crates/bencode/README.md
10 changes: 7 additions & 3 deletions crates/buffers/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
[package]
name = "buffers"
version = "0.1.0"
name = "librqbit-buffers"
version = "2.2.1"
edition = "2018"
description = "Utils to work with &[u8] and Vec<u8> in librqbit source code."
license = "Apache-2.0"
documentation = "https://docs.rs/librqbit-buffers"
readme = "README.md"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
serde = {version = "1", features=["derive"]}
clone_to_owned = {path="../clone_to_owned"}
clone_to_owned = {path="../clone_to_owned", package="librqbit-clone-to-owned", version = "2.2.1"}
1 change: 1 addition & 0 deletions crates/buffers/README.md
6 changes: 4 additions & 2 deletions crates/clone_to_owned/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
[package]
name = "clone_to_owned"
version = "0.1.0"
name = "librqbit-clone-to-owned"
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"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
1 change: 1 addition & 0 deletions crates/clone_to_owned/README.md
21 changes: 16 additions & 5 deletions crates/dht/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,17 +1,28 @@
[package]
name = "dht"
version = "0.1.0"
name = "librqbit-dht"
version = "2.2.1"
edition = "2018"
description = "DHT implementation, used in rqbit torrent client."
license = "Apache-2.0"
documentation = "https://docs.rs/librqbit-dht"
repository = "https://github.com/ikatson/rqbit"
readme = "README.md"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[features]
default = ["sha1-system"]
sha1-system = ["bencode/sha1-system", "librqbit-core/sha1-system"]
sha1-openssl = ["bencode/sha1-openssl", "librqbit-core/sha1-openssl"]
sha1-rust = ["bencode/sha1-rust", "librqbit-core/sha1-rust"]

[dependencies]
tokio = {version = "1", features = ["macros", "rt-multi-thread", "net", "sync"]}
tokio-stream = {version = "0.1", features = ["sync"]}
serde = {version = "1", features = ["derive"]}
serde_json = "1"
hex = "0.4"
bencode = {path = "../bencode", default-features=false}
bencode = {path = "../bencode", default-features=false, package="librqbit-bencode", version="2.2.1"}
anyhow = "1"
parking_lot = "0.12"
log = "0.4"
Expand All @@ -21,7 +32,7 @@ rand = "0.8"
indexmap = "1.7"
directories = "4"

clone_to_owned = {path="../clone_to_owned"}
librqbit_core = {path="../librqbit_core"}
clone_to_owned = {path="../clone_to_owned", package="librqbit-clone-to-owned", version = "2.2.1"}
librqbit-core = {path="../librqbit_core", version = "2.2.1"}

[dev-dependencies]
1 change: 1 addition & 0 deletions crates/dht/README.md
2 changes: 1 addition & 1 deletion crates/dht/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::{str::FromStr, time::Duration};

use anyhow::Context;
use dht::{Dht, Id20};
use librqbit_dht::{Dht, Id20};
use log::info;
use tokio_stream::StreamExt;

Expand Down
Loading

0 comments on commit b763f95

Please sign in to comment.