Compare commits

..

10 commits

Author SHA1 Message Date
Naim A 4d3f13b76d
Update README.md 2022-08-03 00:39:49 +03:00
Alfonso Montero a05ad76266 Dockerfile: Use ENTRYPOINT for binary and CMD for switches 2022-08-03 00:39:04 +03:00
dependabot[bot] 9575370ea4 Bump clap from 3.2.8 to 3.2.16
Bumps [clap](https://github.com/clap-rs/clap) from 3.2.8 to 3.2.16.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v3.2.8...v3.2.16)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-02 21:29:20 +03:00
Alfonso Montero 48b227b529 Dockerfile: do not hardcode --jobs switch when cargo build'ing, but allow build args. 2022-08-02 21:28:23 +03:00
dependabot[bot] 1ce8800dc0 Bump tokio from 1.17.0 to 1.19.2
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.17.0 to 1.19.2.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/commits)

---
updated-dependencies:
- dependency-name: tokio
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-01 09:49:36 +03:00
dependabot[bot] 3a51d0b69e Bump clap from 3.1.10 to 3.2.8
Bumps [clap](https://github.com/clap-rs/clap) from 3.1.10 to 3.2.8.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v3.1.10...v3.2.8)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-01 09:49:20 +03:00
dependabot[bot] 573ee32942 Bump clap from 3.1.0 to 3.1.10
Bumps [clap](https://github.com/clap-rs/clap) from 3.1.0 to 3.1.10.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v3.1.0...v3.1.10)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-20 10:39:39 +03:00
dependabot[bot] a9fdc38e61 Bump fern from 0.6.0 to 0.6.1
Bumps [fern](https://github.com/daboross/fern) from 0.6.0 to 0.6.1.
- [Release notes](https://github.com/daboross/fern/releases)
- [Changelog](https://github.com/daboross/fern/blob/main/CHANGELOG.md)
- [Commits](https://github.com/daboross/fern/compare/fern-0.6.0...fern-0.6.1)

---
updated-dependencies:
- dependency-name: fern
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-20 10:38:44 +03:00
dependabot[bot] 36463b8a47 Bump clap from 3.0.13 to 3.1.0
Bumps [clap](https://github.com/clap-rs/clap) from 3.0.13 to 3.1.0.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v3.0.13...clap_complete-v3.1.0)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-17 12:59:46 +02:00
dependabot[bot] ca47e11a9c Bump tokio from 1.16.1 to 1.17.0
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.16.1 to 1.17.0.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.16.1...tokio-1.17.0)

---
updated-dependencies:
- dependency-name: tokio
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-17 09:37:30 +02:00
4 changed files with 84 additions and 47 deletions

115
Cargo.lock generated
View file

@ -122,19 +122,28 @@ dependencies = [
[[package]] [[package]]
name = "clap" name = "clap"
version = "3.0.13" version = "3.2.16"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "08799f92c961c7a1cf0cc398a9073da99e21ce388b46372c37f3191f2f3eed3e" checksum = "a3dbbb6653e7c55cc8595ad3e1f7be8f32aba4eb7ff7f0fd1163d4f3d137c0a9"
dependencies = [ dependencies = [
"atty", "atty",
"bitflags", "bitflags",
"clap_lex",
"indexmap", "indexmap",
"os_str_bytes",
"strsim", "strsim",
"termcolor", "termcolor",
"textwrap", "textwrap",
] ]
[[package]]
name = "clap_lex"
version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5"
dependencies = [
"os_str_bytes",
]
[[package]] [[package]]
name = "cpufeatures" name = "cpufeatures"
version = "0.2.1" version = "0.2.1"
@ -155,9 +164,9 @@ dependencies = [
[[package]] [[package]]
name = "fern" name = "fern"
version = "0.6.0" version = "0.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8c9a4820f0ccc8a7afd67c39a0f1a0f4b07ca1725164271a64939d7aeb9af065" checksum = "3bdd7b0849075e79ee9a1836df22c717d1eba30451796fdc631b04565dd11e2a"
dependencies = [ dependencies = [
"log", "log",
] ]
@ -376,9 +385,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
[[package]] [[package]]
name = "libc" name = "libc"
version = "0.2.116" version = "0.2.126"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "565dbd88872dbe4cc8a46e527f26483c1d1f7afa6b884a3bd6cd893d4f98da74" checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836"
[[package]] [[package]]
name = "log" name = "log"
@ -419,33 +428,14 @@ dependencies = [
[[package]] [[package]]
name = "mio" name = "mio"
version = "0.7.14" version = "0.8.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8067b404fe97c70829f082dec8bcf4f71225d7eaea1d8645349cb76fa06205cc" checksum = "713d550d9b44d89174e066b7a6217ae06234c10cb47819a88290d2b353c31799"
dependencies = [ dependencies = [
"libc", "libc",
"log", "log",
"miow", "wasi 0.11.0+wasi-snapshot-preview1",
"ntapi", "windows-sys",
"winapi",
]
[[package]]
name = "miow"
version = "0.3.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21"
dependencies = [
"winapi",
]
[[package]]
name = "ntapi"
version = "0.3.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3f6bb902e437b6d86e03cce10a7e2af662292c5dfef23b65899ea3ac9354ad44"
dependencies = [
"winapi",
] ]
[[package]] [[package]]
@ -494,9 +484,6 @@ name = "os_str_bytes"
version = "6.0.0" version = "6.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e22443d1643a904602595ba1cd8f7d896afe56d26712531c5ff73a15b2fbf64" checksum = "8e22443d1643a904602595ba1cd8f7d896afe56d26712531c5ff73a15b2fbf64"
dependencies = [
"memchr",
]
[[package]] [[package]]
name = "percent-encoding" name = "percent-encoding"
@ -681,9 +668,9 @@ dependencies = [
[[package]] [[package]]
name = "textwrap" name = "textwrap"
version = "0.14.2" version = "0.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0066c8d12af8b5acd21e00547c3797fde4e8677254a7ee429176ccebbe93dd80" checksum = "b1141d4d61095b28419e22cb0bbf02755f5e54e0526f97f1e3d1d160e60885fb"
[[package]] [[package]]
name = "time" name = "time"
@ -692,15 +679,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255" checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255"
dependencies = [ dependencies = [
"libc", "libc",
"wasi", "wasi 0.10.0+wasi-snapshot-preview1",
"winapi", "winapi",
] ]
[[package]] [[package]]
name = "tokio" name = "tokio"
version = "1.16.1" version = "1.19.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0c27a64b625de6d309e8c57716ba93021dccf1b3b5c97edd6d3dd2d2135afc0a" checksum = "c51a52ed6686dd62c320f9b89299e9dfb46f730c7a48e635c19f21d116cb1439"
dependencies = [ dependencies = [
"bytes", "bytes",
"libc", "libc",
@ -710,6 +697,7 @@ dependencies = [
"once_cell", "once_cell",
"pin-project-lite", "pin-project-lite",
"signal-hook-registry", "signal-hook-registry",
"socket2",
"tokio-macros", "tokio-macros",
"winapi", "winapi",
] ]
@ -800,7 +788,7 @@ checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987"
[[package]] [[package]]
name = "udpt-rs" name = "udpt-rs"
version = "3.1.1" version = "3.1.2"
dependencies = [ dependencies = [
"async-compression", "async-compression",
"binascii", "binascii",
@ -881,6 +869,12 @@ version = "0.10.0+wasi-snapshot-preview1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f"
[[package]]
name = "wasi"
version = "0.11.0+wasi-snapshot-preview1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
[[package]] [[package]]
name = "winapi" name = "winapi"
version = "0.3.9" version = "0.3.9"
@ -911,3 +905,46 @@ name = "winapi-x86_64-pc-windows-gnu"
version = "0.4.0" version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
[[package]]
name = "windows-sys"
version = "0.36.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2"
dependencies = [
"windows_aarch64_msvc",
"windows_i686_gnu",
"windows_i686_msvc",
"windows_x86_64_gnu",
"windows_x86_64_msvc",
]
[[package]]
name = "windows_aarch64_msvc"
version = "0.36.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47"
[[package]]
name = "windows_i686_gnu"
version = "0.36.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6"
[[package]]
name = "windows_i686_msvc"
version = "0.36.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024"
[[package]]
name = "windows_x86_64_gnu"
version = "0.36.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1"
[[package]]
name = "windows_x86_64_msvc"
version = "0.36.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680"

View file

@ -12,10 +12,10 @@ lto = "fat"
serde = {version = "1.0", features = ["derive"]} serde = {version = "1.0", features = ["derive"]}
bincode = "1.3" bincode = "1.3"
warp = {version = "0.3", default-features = false} warp = {version = "0.3", default-features = false}
tokio = {version = "1.16", features = ["macros", "io-util", "net", "time", "rt-multi-thread", "fs", "sync", "signal"]} tokio = {version = "1.19", features = ["macros", "io-util", "net", "time", "rt-multi-thread", "fs", "sync", "signal"]}
binascii = "0.1" binascii = "0.1"
toml = "0.5" toml = "0.5"
clap = "3.0" clap = "3.2"
log = {version = "0.4", features = ["release_max_level_info"]} log = {version = "0.4", features = ["release_max_level_info"]}
fern = "0.6" fern = "0.6"
serde_json = "1.0" serde_json = "1.0"

View file

@ -1,7 +1,11 @@
FROM rust:latest FROM rust:latest
ARG BUILD_ARGS
COPY . /usr/src/udpt COPY . /usr/src/udpt
WORKDIR /usr/src/udpt WORKDIR /usr/src/udpt
RUN cargo build --release -j4 RUN cargo build --release ${BUILD_ARGS}
CMD ["target/release/udpt-rs", "-c", "/usr/src/udpt/udpt.toml"] ENTRYPOINT [ "target/release/udpt-rs" ]
CMD [ "-c", "/usr/src/udpt/udpt.toml" ]

View file

@ -27,10 +27,6 @@ Please report any bugs you find to our issue tracker. Ideas and feature requests
Any pull request targeting existing issues would be very much appreciated. Any pull request targeting existing issues would be very much appreciated.
If you like this project and want to buy me a coffee, there's a link for that:
<a href="https://www.buymeacoffee.com/naim" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/arial-orange.png" alt="Buy Me A Coffee" height="60px" width="217px"></a>
### Why was UDPT rewritten in rust? ### Why was UDPT rewritten in rust?
For a few reasons, For a few reasons,
1. Rust makes it harder to make mistakes than C/C++, It provides memory safety without runtime cost. 1. Rust makes it harder to make mistakes than C/C++, It provides memory safety without runtime cost.