Merge pull request #32 from ikatson/cargo-package

Update all Cargo.tomls for publishing on crates.io
This commit is contained in:
Igor Katson 2023-11-15 14:48:55 +00:00 committed by GitHub
commit b763f95ce3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 191 additions and 125 deletions

166
Cargo.lock generated
View file

@ -179,17 +179,6 @@ version = "0.21.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d"
[[package]]
name = "bencode"
version = "0.1.0"
dependencies = [
"anyhow",
"buffers",
"clone_to_owned",
"serde",
"sha1w",
]
[[package]]
name = "bincode"
version = "1.3.3"
@ -232,14 +221,6 @@ dependencies = [
"generic-array 0.14.7",
]
[[package]]
name = "buffers"
version = "0.1.0"
dependencies = [
"clone_to_owned",
"serde",
]
[[package]]
name = "bumpalo"
version = "3.13.0"
@ -311,10 +292,6 @@ version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b"
[[package]]
name = "clone_to_owned"
version = "0.1.0"
[[package]]
name = "colorchoice"
version = "1.0.0"
@ -386,28 +363,6 @@ dependencies = [
"winapi",
]
[[package]]
name = "dht"
version = "0.1.0"
dependencies = [
"anyhow",
"bencode",
"clone_to_owned",
"directories",
"futures",
"hex 0.4.3",
"indexmap",
"librqbit_core",
"log",
"parking_lot",
"pretty_env_logger",
"rand",
"serde",
"serde_json",
"tokio",
"tokio-stream",
]
[[package]]
name = "digest"
version = "0.10.7"
@ -904,26 +859,27 @@ checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3"
[[package]]
name = "librqbit"
version = "0.1.0"
version = "2.2.1"
dependencies = [
"anyhow",
"axum",
"bencode",
"bincode",
"bitvec",
"buffers",
"byteorder",
"clone_to_owned",
"crypto-hash",
"dht",
"futures",
"hex 0.4.3",
"http",
"librqbit_core",
"librqbit-bencode",
"librqbit-buffers",
"librqbit-clone-to-owned",
"librqbit-core",
"librqbit-dht",
"librqbit-peer-protocol",
"librqbit-sha1-wrapper",
"log",
"openssl",
"parking_lot",
"peer_binary_protocol",
"pretty_env_logger",
"rand",
"regex",
@ -932,7 +888,6 @@ dependencies = [
"serde_json",
"serde_urlencoded",
"sha1",
"sha1w",
"size_format",
"tokio",
"tokio-stream",
@ -942,15 +897,38 @@ dependencies = [
]
[[package]]
name = "librqbit_core"
version = "0.1.0"
name = "librqbit-bencode"
version = "2.2.1"
dependencies = [
"anyhow",
"librqbit-buffers",
"librqbit-clone-to-owned",
"librqbit-sha1-wrapper",
"serde",
]
[[package]]
name = "librqbit-buffers"
version = "2.2.1"
dependencies = [
"librqbit-clone-to-owned",
"serde",
]
[[package]]
name = "librqbit-clone-to-owned"
version = "2.2.1"
[[package]]
name = "librqbit-core"
version = "2.2.1"
dependencies = [
"anyhow",
"bencode",
"buffers",
"clone_to_owned",
"hex 0.4.3",
"itertools",
"librqbit-bencode",
"librqbit-buffers",
"librqbit-clone-to-owned",
"log",
"parking_lot",
"serde",
@ -958,6 +936,52 @@ dependencies = [
"uuid",
]
[[package]]
name = "librqbit-dht"
version = "2.2.1"
dependencies = [
"anyhow",
"directories",
"futures",
"hex 0.4.3",
"indexmap",
"librqbit-bencode",
"librqbit-clone-to-owned",
"librqbit-core",
"log",
"parking_lot",
"pretty_env_logger",
"rand",
"serde",
"serde_json",
"tokio",
"tokio-stream",
]
[[package]]
name = "librqbit-peer-protocol"
version = "2.2.1"
dependencies = [
"anyhow",
"bincode",
"bitvec",
"byteorder",
"librqbit-bencode",
"librqbit-buffers",
"librqbit-clone-to-owned",
"librqbit-core",
"serde",
]
[[package]]
name = "librqbit-sha1-wrapper"
version = "2.2.1"
dependencies = [
"crypto-hash",
"openssl",
"sha1",
]
[[package]]
name = "linux-raw-sys"
version = "0.3.8"
@ -1222,21 +1246,6 @@ dependencies = [
"regex",
]
[[package]]
name = "peer_binary_protocol"
version = "0.1.0"
dependencies = [
"anyhow",
"bencode",
"bincode",
"bitvec",
"buffers",
"byteorder",
"clone_to_owned",
"librqbit_core",
"serde",
]
[[package]]
name = "percent-encoding"
version = "2.3.0"
@ -1478,9 +1487,9 @@ version = "2.0.0"
dependencies = [
"anyhow",
"clap",
"dht",
"futures",
"librqbit",
"librqbit-dht",
"log",
"parse_duration",
"pretty_env_logger",
@ -1680,15 +1689,6 @@ dependencies = [
"digest",
]
[[package]]
name = "sha1w"
version = "0.1.0"
dependencies = [
"crypto-hash",
"openssl",
"sha1",
]
[[package]]
name = "size_format"
version = "1.0.2"

2
crates/README.md Normal file
View file

@ -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).

View file

@ -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
@ -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
crates/bencode/README.md Symbolic link
View file

@ -0,0 +1 @@
../README.md

View file

@ -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
crates/buffers/README.md Symbolic link
View file

@ -0,0 +1 @@
../README.md

View file

@ -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

View file

@ -0,0 +1 @@
../README.md

View file

@ -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"
@ -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
crates/dht/README.md Symbolic link
View file

@ -0,0 +1 @@
../README.md

View file

@ -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;

View file

@ -1,8 +1,15 @@
[package]
name = "librqbit"
version = "0.1.0"
version = "2.2.1"
authors = ["Igor Katson <igor.katson@gmail.com>"]
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"
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", "default-tls"]
@ -12,23 +19,21 @@ sha1-rust = ["sha1w/sha1-rust"]
default-tls = ["reqwest/default-tls"]
rust-tls = ["reqwest/rustls-tls"]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
bencode = {path = "../bencode", default-features=false}
buffers = {path = "../buffers"}
librqbit_core = {path = "../librqbit_core"}
clone_to_owned = {path = "../clone_to_owned"}
peer_binary_protocol = {path = "../peer_binary_protocol"}
sha1w = {path = "../sha1w", default-features=false}
dht = {path = "../dht"}
bencode = {path = "../bencode", default-features=false, package="librqbit-bencode", version="2.2.1"}
buffers = {path = "../buffers", package="librqbit-buffers", version = "2.2.1"}
librqbit-core = {path = "../librqbit_core", version = "2.2.1"}
clone_to_owned = {path = "../clone_to_owned", package="librqbit-clone-to-owned", version = "2.2.1"}
peer_binary_protocol = {path = "../peer_binary_protocol", package="librqbit-peer-protocol", version = "2.2.1"}
sha1w = {path = "../sha1w", default-features=false, package="librqbit-sha1-wrapper", version="2.2.1"}
dht = {path = "../dht", package="librqbit-dht", version="2.2.1"}
tokio = {version = "1", features = ["macros", "rt-multi-thread"]}
axum = {version = "0.6"}
tokio-stream = "0.1"
serde = {version = "1", features=["derive"]}
serde_json = "1"
serde_urlencoded = "*"
serde_urlencoded = "0.7"
anyhow = "1"
http = "0.2"

1
crates/librqbit/README.md Symbolic link
View file

@ -0,0 +1 @@
../README.md

View file

@ -1,10 +1,21 @@
[package]
name = "librqbit_core"
version = "0.1.0"
name = "librqbit-core"
version = "2.2.1"
edition = "2018"
description = "Important utilities used throughout librqbit useful for working with torrents."
license = "Apache-2.0"
documentation = "https://docs.rs/librqbit-core"
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"]
sha1-openssl = ["bencode/sha1-openssl"]
sha1-rust = ["bencode/sha1-rust"]
[dependencies]
hex = "0.4"
anyhow = "1"
@ -13,7 +24,7 @@ uuid = {version = "1", features = ["v4"]}
log = "0.4"
parking_lot = "0.12"
serde = {version = "1", features=["derive"]}
buffers = {path="../buffers"}
bencode = {path = "../bencode", default-features=false}
clone_to_owned = {path="../clone_to_owned"}
buffers = {path="../buffers", package="librqbit-buffers", version = "2.2.1"}
bencode = {path = "../bencode", default-features=false, package="librqbit-bencode", version="2.2.1"}
clone_to_owned = {path="../clone_to_owned", package="librqbit-clone-to-owned", version = "2.2.1"}
itertools = "0.11.0"

View file

@ -0,0 +1 @@
../README.md

View file

@ -1,17 +1,28 @@
[package]
name = "peer_binary_protocol"
version = "0.1.0"
name = "librqbit-peer-protocol"
version = "2.2.1"
edition = "2018"
description = "Protocol for working with torrent peers. Used in rqbit torrent client."
license = "Apache-2.0"
documentation = "https://docs.rs/librqbit-peer-protocol"
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]
serde = {version = "1", features = ["derive"]}
bincode = "1"
byteorder = "1"
buffers = {path="../buffers"}
bencode = {path = "../bencode", default-features=false}
clone_to_owned = {path="../clone_to_owned"}
librqbit_core = {path="../librqbit_core"}
buffers = {path="../buffers", package="librqbit-buffers", version = "2.2.1"}
bencode = {path = "../bencode", default-features=false, package="librqbit-bencode", version="2.2.1"}
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"}
bitvec = "1"
anyhow = "1"

View file

@ -0,0 +1 @@
../README.md

View file

@ -14,8 +14,8 @@ default-tls = ["librqbit/default-tls"]
rust-tls = ["librqbit/rust-tls"]
[dependencies]
librqbit = {path="../librqbit", default-features=false}
dht = {path="../dht"}
librqbit = {path="../librqbit", default-features=false, version = "2.2.1"}
dht = {path="../dht", package="librqbit-dht", version="2.2.1"}
tokio = {version = "1", features = ["macros", "rt-multi-thread"]}
anyhow = "1"
clap = {version = "4", features = ["derive", "deprecated"]}

1
crates/rqbit/LICENSE Symbolic link
View file

@ -0,0 +1 @@
../../LICENSE

1
crates/rqbit/README.md Symbolic link
View file

@ -0,0 +1 @@
../../README.md

View file

@ -1,7 +1,12 @@
[package]
name = "sha1w"
version = "0.1.0"
name = "librqbit-sha1-wrapper"
version = "2.2.1"
edition = "2018"
description = "Common interface around various sha1 implementations used in rqbit torrent client."
license = "Apache-2.0"
documentation = "https://docs.rs/librqbit-sha1-wrapper"
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

1
crates/sha1w/README.md Symbolic link
View file

@ -0,0 +1 @@
../README.md