From eb428f295330150976c1deb517e432910aebf49f Mon Sep 17 00:00:00 2001 From: Cameron Garnham Date: Sun, 15 Oct 2023 15:09:54 +0200 Subject: [PATCH] various: small updates --- .github/workflows/coverage.yaml | 4 +- .github/workflows/labels.yaml | 2 +- Cargo.lock | 74 +++++++++++++++++-------------- Cargo.toml | 68 ++++++++++++++-------------- README.md | 31 ++++++------- contrib/bencode/Cargo.toml | 4 +- packages/configuration/Cargo.toml | 12 ++--- packages/located-error/Cargo.toml | 2 +- packages/primitives/Cargo.toml | 4 +- packages/test-helpers/Cargo.toml | 4 +- 10 files changed, 104 insertions(+), 101 deletions(-) diff --git a/.github/workflows/coverage.yaml b/.github/workflows/coverage.yaml index 1e7dace66..7f5bf2946 100644 --- a/.github/workflows/coverage.yaml +++ b/.github/workflows/coverage.yaml @@ -53,11 +53,11 @@ jobs: - id: check name: Run Build Checks - run: cargo check --workspace --all-targets --all-features + run: cargo check --tests --benches --examples --workspace --all-targets --all-features - id: test name: Run Unit Tests - run: cargo test --workspace --all-targets --all-features + run: cargo test --tests --benches --examples --workspace --all-targets --all-features - id: coverage name: Generate Coverage Report diff --git a/.github/workflows/labels.yaml b/.github/workflows/labels.yaml index bb8283f30..97aaa0308 100644 --- a/.github/workflows/labels.yaml +++ b/.github/workflows/labels.yaml @@ -29,7 +29,7 @@ jobs: - id: sync name: Apply Labels from File - uses: EndBug/label-sync@v2 + uses: EndBug/label-sync@da00f2c11fdb78e4fae44adac2fdd713778ea3e8 with: config-file: .github/labels.json delete-other-labels: true diff --git a/Cargo.lock b/Cargo.lock index ef5e1a4e3..9df190ae5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -120,9 +120,9 @@ checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" [[package]] name = "async-compression" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb42b2197bf15ccb092b62c74515dbd8b86d0effd934795f6687c93b6e679a2c" +checksum = "f658e2baef915ba0f26f1f7c42bfb8e12f532a01f449a090ded75ae7a07e9ba2" dependencies = [ "brotli", "flate2", @@ -136,9 +136,9 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.73" +version = "0.1.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0" +checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" dependencies = [ "proc-macro2", "quote", @@ -765,10 +765,11 @@ dependencies = [ [[package]] name = "deranged" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2696e8a945f658fd14dc3b87242e6b80cd0f36ff04ea560fa39082368847946" +checksum = "0f32d04922c60427da6f9fef14d042d9edddef64cb9d4ce0d64d0685fbeb1fd3" dependencies = [ + "powerfmt", "serde", ] @@ -894,9 +895,9 @@ dependencies = [ [[package]] name = "flate2" -version = "1.0.27" +version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6c98ee8095e9d1dcbf2fcc6d95acccb90d1c81db1e44725c6a984b1dbdfb010" +checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" dependencies = [ "crc32fast", "libz-sys", @@ -2131,6 +2132,12 @@ dependencies = [ "plotters-backend", ] +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + [[package]] name = "ppv-lite86" version = "0.2.17" @@ -2347,9 +2354,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.0" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d119d7c7ca818f8a53c300863d4f87566aac09943aef5b355bb83969dae75d87" +checksum = "aaac441002f822bc9705a681810a4dd2963094b9ca0ddc41cb963a4c189189ea" dependencies = [ "aho-corasick", "memchr", @@ -2359,9 +2366,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "465c6fc0621e4abc4187a2bda0937bfd4f722c2730b29562e19689ea796c9a4b" +checksum = "5011c7e263a695dc8ca064cddb722af1be54e517a280b12a5356f98366899e5d" dependencies = [ "aho-corasick", "memchr", @@ -2370,9 +2377,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56d84fdd47036b038fc80dd333d10b6aab10d5d31f4a366e20014def75328d33" +checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] name = "rend" @@ -2538,9 +2545,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.18" +version = "0.38.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a74ee2d7c2581cd139b42447d7d9389b889bdaad3a73f1ebb16f2a3237bb19c" +checksum = "745ecfa778e66b2b63c88a61cb36e0eea109e803b0b86bf9879fbc77c70e86ed" dependencies = [ "bitflags 2.4.0", "errno", @@ -2678,9 +2685,9 @@ checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" [[package]] name = "serde" -version = "1.0.188" +version = "1.0.189" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9e0fcba69a370eed61bcf2b728575f726b50b55cba78064753d708ddc7549e" +checksum = "8e422a44e74ad4001bdc8eede9a4570ab52f71190e9c076d14369f38b9200537" dependencies = [ "serde_derive", ] @@ -2706,9 +2713,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.188" +version = "1.0.189" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" +checksum = "1e48d1f918009ce3145511378cf68d613e3b3d9137d67272562080d68a2b32d5" dependencies = [ "proc-macro2", "quote", @@ -3008,12 +3015,13 @@ dependencies = [ [[package]] name = "time" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "426f806f4089c493dcac0d24c29c01e2c38baf8e30f1b716ee37e83d200b18fe" +checksum = "c4a34ab300f2dee6e562c10a046fc05e358b29f9bf92277f30c3c8d82275f6f5" dependencies = [ "deranged", "itoa", + "powerfmt", "serde", "time-core", "time-macros", @@ -3322,11 +3330,10 @@ checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" [[package]] name = "tracing" -version = "0.1.37" +version = "0.1.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" +checksum = "ee2ef2af84856a50c1d430afce2fdded0a4ec7eda868db86409b4543df0797f9" dependencies = [ - "cfg-if", "log", "pin-project-lite", "tracing-core", @@ -3334,9 +3341,9 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.31" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ "once_cell", ] @@ -3639,9 +3646,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "winnow" -version = "0.5.16" +version = "0.5.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "037711d82167854aff2018dfd193aa0fef5370f456732f0d5a0c59b0f1b4b907" +checksum = "a3b801d0e0a6726477cc207f60162da452f3a95adb368399bef20a946e06f65c" dependencies = [ "memchr", ] @@ -3676,20 +3683,19 @@ dependencies = [ [[package]] name = "zstd" -version = "0.12.4" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a27595e173641171fc74a1232b7b1c7a7cb6e18222c11e9dfb9888fa424c53c" +checksum = "bffb3309596d527cfcba7dfc6ed6052f1d39dfbd7c867aa2e865e4a449c10110" dependencies = [ "zstd-safe", ] [[package]] name = "zstd-safe" -version = "6.0.6" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee98ffd0b48ee95e6c5168188e44a54550b1564d9d530ee21d5f0eaed1069581" +checksum = "43747c7422e2924c11144d5229878b98180ef8b06cca4ab5af37afc8a8d8ea3e" dependencies = [ - "libc", "zstd-sys", ] diff --git a/Cargo.toml b/Cargo.toml index 3c9354cae..80d7d30b0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,47 +29,47 @@ rust-version = "1.72" version = "3.0.0-alpha.12-develop" [dependencies] -aquatic_udp_protocol = "0.8" -async-trait = "0.1" -axum = "0.6" -axum-client-ip = "0.4" -axum-server = { version = "0.5", features = ["tls-rustls"] } -binascii = "0.1" -chrono = { version = "0.4", default-features = false, features = ["clock"] } -config = "0.13" -derive_more = "0.99" -fern = "0.6" -futures = "0.3" -hyper = "0.14" -lazy_static = "1.4" -log = { version = "0.4", features = ["release_max_level_info"] } -multimap = "0.9" -openssl = { version = "0.10", features = ["vendored"] } -percent-encoding = "2.2" -r2d2 = "0.8" -r2d2_mysql = "24.0" -r2d2_sqlite = { version = "0.22", features = ["bundled"] } -rand = "0.8" -serde = { version = "1.0", features = ["derive"] } -serde_bencode = "^0.2" -serde_json = "1.0" -serde_with = "3.2" -thiserror = "1.0" -tokio = { version = "1.29", features = ["macros", "net", "rt-multi-thread", "signal", "sync"] } +aquatic_udp_protocol = "0" +async-trait = "0" +axum = "0" +axum-client-ip = "0" +axum-server = { version = "0", features = ["tls-rustls"] } +binascii = "0" +chrono = { version = "0", default-features = false, features = ["clock"] } +config = "0" +derive_more = "0" +fern = "0" +futures = "0" +hyper = "0" +lazy_static = "1" +log = { version = "0", features = ["release_max_level_info"] } +multimap = "0" +openssl = { version = "0", features = ["vendored"] } +percent-encoding = "2" +r2d2 = "0" +r2d2_mysql = "24" +r2d2_sqlite = { version = "0", features = ["bundled"] } +rand = "0" +serde = { version = "1", features = ["derive"] } +serde_bencode = "0" +serde_json = "1" +serde_with = "3" +thiserror = "1" +tokio = { version = "1", features = ["macros", "net", "rt-multi-thread", "signal", "sync"] } torrust-tracker-configuration = { version = "3.0.0-alpha.12-develop", path = "packages/configuration" } torrust-tracker-contrib-bencode = { version = "3.0.0-alpha.12-develop", path = "contrib/bencode" } torrust-tracker-located-error = { version = "3.0.0-alpha.12-develop", path = "packages/located-error" } torrust-tracker-primitives = { version = "3.0.0-alpha.12-develop", path = "packages/primitives" } -tower-http = { version = "0.4", features = ["compression-full"] } +tower-http = { version = "0", features = ["compression-full"] } uuid = { version = "1", features = ["v4"] } [dev-dependencies] -local-ip-address = "0.5" -mockall = "0.11" -reqwest = { version = "0.11.18", features = ["json"] } -serde_bytes = "0.11" -serde_repr = "0.1" -serde_urlencoded = "0.7" +local-ip-address = "0" +mockall = "0" +reqwest = { version = "0", features = ["json"] } +serde_bytes = "0" +serde_repr = "0" +serde_urlencoded = "0" torrust-tracker-test-helpers = { version = "3.0.0-alpha.12-develop", path = "packages/test-helpers" } [workspace] diff --git a/README.md b/README.md index b43db1316..e584db3c8 100644 --- a/README.md +++ b/README.md @@ -2,16 +2,14 @@ [![container_wf_b]][container_wf] [![coverage_wf_b]][coverage_wf] [![deployment_wf_b]][deployment_wf] [![testing_wf_b]][testing_wf] -__Torrust Tracker__, is a [BitTorrent][bittorrent] Tracker (a service that matchmakes peers and collects statistics) written in [Rust Language][rust] and [axum] (a modern web application framework). ___This tracker aims to be respectful to established standards, (both [formal][BEP 00] and [otherwise][torrent_source_felid]).___ +__Torrust Tracker__, is a [BitTorrent][bittorrent] Tracker that matchmakes peers and collects statistics. Written in [Rust Language][rust] with the [axum] web framework. ___This tracker aims to be respectful to established standards, (both [formal][BEP 00] and [otherwise][torrent_source_felid]).___ > This is a [Torrust][torrust] project and is in active development. It is community supported as well as sponsored by [Nautilus Cyberneering][nautilus]. -- _We have a [container guide][containers.md] for those who wish to get started with __Docker__ or __Podman___ - ## Key Features - [x] High Quality and Modern Rust Codebase. -- [x] [Documentation] Generated from Code Comments. +- [x] [Documentation][docs] Generated from Code Comments. - [x] [Comprehensive Suit][coverage] of Unit and Functional Tests. - [x] Good Performance in Busy Conditions. - [x] Support for `UDP`, `HTTP`, and `TLS` Sockets. @@ -35,7 +33,7 @@ __Torrust Tracker__, is a [BitTorrent][bittorrent] Tracker (a service that match ### Container Version -The Torrust Tracker is [deployed to DockerHub][dockerhub_torrust_tracker], you can run a demo immediately with the following commands: +The Torrust Tracker is [deployed to DockerHub][dockerhub], you can run a demo immediately with the following commands: #### Docker: @@ -126,15 +124,14 @@ The following services are provided by the default configuration: - [Tracker (UDP)][udp] ## Contributing - -This is an open-source community supported project.
-We welcome contributions from the community! +We are happy to support and welcome new people to our project. Please consider our [contributor guide][guide.md].
+This is an open-source community supported project. We welcome contributions from the community! __How can you contribute?__ - Bug reports and feature requests. - Code contributions. You can start by looking at the issues labeled "[good first issues]". -- Documentation improvements. Check the [documentation] and [API documentation] for typos, errors, or missing information. +- Documentation improvements. Check the [documentation][docs] and [API documentation][api] for typos, errors, or missing information. - Participation in the community. You can help by answering questions in the [discussions]. ## License @@ -153,8 +150,7 @@ Some files include explicit copyright notices and/or license notices. For prosperity, versions of Torrust Tracker that are older than five years are automatically granted the [MIT-0][MIT_0] license in addition to the existing [AGPL-3.0-only][AGPL_3_0] license. -## Contributions - +## Contributor Agreement The copyright of the Torrust Tracker is retained by the respective authors. **Contributors agree:** @@ -163,6 +159,8 @@ The copyright of the Torrust Tracker is retained by the respective authors. **The Torrust-Tracker project has no copyright assignment agreement.** +_We kindly ask you to take time and consider The Torrust Project [Contributor Agreement][agreement.md] in full._ + ## Acknowledgments This project was a joint effort by [Nautilus Cyberneering GmbH][nautilus] and [Dutch Bits]. Also thanks to [Naim A.] and [greatest-ape] for some parts of the code. Further added features and functions thanks to [Power2All]. @@ -185,7 +183,7 @@ This project was a joint effort by [Nautilus Cyberneering GmbH][nautilus] and [D [coverage]: https://app.codecov.io/gh/torrust/torrust-tracker [torrust]: https://torrust.com/ -[dockerhub_torrust_tracker]: https://hub.docker.com/r/torrust/tracker/tags +[dockerhub]: https://hub.docker.com/r/torrust/tracker/tags [torrent_source_felid]: https://github.com/qbittorrent/qBittorrent/discussions/19406 @@ -199,24 +197,23 @@ This project was a joint effort by [Nautilus Cyberneering GmbH][nautilus] and [D [containers.md]: ./docs/containers.md +[docs]: https://docs.rs/torrust-tracker/latest/ [api]: https://docs.rs/torrust-tracker/latest/torrust_tracker/servers/apis/v1 [http]: https://docs.rs/torrust-tracker/latest/torrust_tracker/servers/http [udp]: https://docs.rs/torrust-tracker/latest/torrust_tracker/servers/udp [good first issues]: https://github.com/torrust/torrust-tracker/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22 -[documentation]: https://docs.rs/torrust-tracker/ -[API documentation]: https://docs.rs/torrust-tracker/latest/torrust_tracker/servers/apis/v1 [discussions]: https://github.com/torrust/torrust-tracker/discussions -[COPYRIGHT]: ./COPYRIGHT +[guide.md]: https://github.com/torrust/.github/blob/main/info/contributing.md +[agreement.md]: https://github.com/torrust/.github/blob/main/info/licensing/contributor_agreement_v01.md + [AGPL_3_0]: ./docs/licenses/LICENSE-AGPL_3_0 [MIT_0]: ./docs/licenses/LICENSE-MIT_0 [FSF]: https://www.fsf.org/ - [nautilus]: https://github.com/orgs/Nautilus-Cyberneering/ [Dutch Bits]: https://dutchbits.nl [Naim A.]: https://github.com/naim94a/udpt [greatest-ape]: https://github.com/greatest-ape/aquatic [Power2All]: https://github.com/power2all - diff --git a/contrib/bencode/Cargo.toml b/contrib/bencode/Cargo.toml index 3918aa6ba..f7bab0585 100644 --- a/contrib/bencode/Cargo.toml +++ b/contrib/bencode/Cargo.toml @@ -16,10 +16,10 @@ rust-version.workspace = true version.workspace = true [dependencies] -error-chain = "0.12" +error-chain = "0" [dev-dependencies] -criterion = "0.5" +criterion = "0" [[test]] name = "test" diff --git a/packages/configuration/Cargo.toml b/packages/configuration/Cargo.toml index 94cf1d0f5..e373b4269 100644 --- a/packages/configuration/Cargo.toml +++ b/packages/configuration/Cargo.toml @@ -15,12 +15,12 @@ rust-version.workspace = true version.workspace = true [dependencies] -config = "0.13" -log = { version = "0.4", features = ["release_max_level_info"] } -serde = { version = "1.0", features = ["derive"] } -serde_with = "3.2" -thiserror = "1.0" -toml = "0.8" +config = "0" +log = { version = "0", features = ["release_max_level_info"] } +serde = { version = "1", features = ["derive"] } +serde_with = "3" +thiserror = "1" +toml = "0" torrust-tracker-located-error = { version = "3.0.0-alpha.12-develop", path = "../located-error" } torrust-tracker-primitives = { version = "3.0.0-alpha.12-develop", path = "../primitives" } diff --git a/packages/located-error/Cargo.toml b/packages/located-error/Cargo.toml index 6bc219374..5b266934c 100644 --- a/packages/located-error/Cargo.toml +++ b/packages/located-error/Cargo.toml @@ -15,7 +15,7 @@ rust-version.workspace = true version.workspace = true [dependencies] -log = { version = "0.4", features = ["release_max_level_info"] } +log = { version = "0", features = ["release_max_level_info"] } [dev-dependencies] thiserror = "1.0" diff --git a/packages/primitives/Cargo.toml b/packages/primitives/Cargo.toml index 3fac88bef..efcce71a9 100644 --- a/packages/primitives/Cargo.toml +++ b/packages/primitives/Cargo.toml @@ -15,5 +15,5 @@ rust-version.workspace = true version.workspace = true [dependencies] -derive_more = "0.99" -serde = { version = "1.0", features = ["derive"] } +derive_more = "0" +serde = { version = "1", features = ["derive"] } diff --git a/packages/test-helpers/Cargo.toml b/packages/test-helpers/Cargo.toml index d428cbf3e..9ae891a01 100644 --- a/packages/test-helpers/Cargo.toml +++ b/packages/test-helpers/Cargo.toml @@ -15,7 +15,7 @@ rust-version.workspace = true version.workspace = true [dependencies] -lazy_static = "1.4" -rand = "0.8.5" +lazy_static = "1" +rand = "0" torrust-tracker-configuration = { version = "3.0.0-alpha.12-develop", path = "../configuration" } torrust-tracker-primitives = { version = "3.0.0-alpha.12-develop", path = "../primitives" }