Skip to content

Commit

Permalink
0.7.0 Legos (#17)
Browse files Browse the repository at this point in the history
Restructured the server into legos.
  • Loading branch information
0xAlcibiades authored Sep 12, 2024
1 parent 6d93b42 commit 4706e3f
Show file tree
Hide file tree
Showing 45 changed files with 2,747 additions and 4,546 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ jobs:
strategy:
fail-fast: false
matrix:
rust: [ "stable", "beta", "nightly", "1.65" ] # MSRV
rust: [ "stable", "beta", "nightly", "1.80" ] # MSRV
flags: [ "--no-default-features", "", "--all-features" ]
exclude:
# Skip because some features have highest MSRV.
- rust: "1.65" # MSRV
- rust: "1.80" # MSRV
flags: "--all-features"
steps:
- uses: actions/checkout@v3
Expand All @@ -37,10 +37,10 @@ jobs:
cache-on-failure: true
# Only run tests on the latest stable and above
- name: check
if: ${{ matrix.rust == '1.65' }} # MSRV
if: ${{ matrix.rust == '1.80' }} # MSRV
run: cargo check --workspace ${{ matrix.flags }}
- name: test
if: ${{ matrix.rust != '1.65' }} # MSRV
if: ${{ matrix.rust != '1.80' }} # MSRV
run: cargo test --workspace ${{ matrix.flags }}

coverage:
Expand Down
110 changes: 46 additions & 64 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,79 +1,61 @@
[package]
authors = ["Programatik <programatik29@gmail.com>", "Megsdevs <megsdevs@outlook.com", "0xAlcibiades <alcibiades.eth@protonmail.com>"]
authors = ["0xAlcibiades <alcibiades@warlock.xyz>"]
categories = ["asynchronous", "network-programming", "web-programming"]
description = "High level server for hyper and tower."
edition = "2021"
homepage = "https://github.com/valorem-labs-inc/hyper-server"
keywords = ["axum", "tonic", "hyper", "tower", "server"]
homepage = "https://github.com/warlock-labs/hyper-server"
keywords = ["tcp", "tls", "http", "hyper", "tokio"]
license = "MIT"
name = "hyper-server"
readme = "README.md"
repository = "https://github.com/valorem-labs-inc/hyper-server"
version = "0.5.3"
version = "0.7.0"

[features]
default = []
tls-rustls = ["arc-swap", "pin-project-lite", "rustls", "rustls-pemfile", "tokio/fs", "tokio/time", "tokio-rustls"]
tls-openssl = ["openssl", "tokio-openssl", "pin-project-lite"]
proxy-protocol = ["ppp", "pin-project-lite"]
[target.'cfg(not(target_env = "msvc"))'.dependencies]
tikv-jemallocator = { version = "0.6", optional = true }

[dependencies]

# optional dependencies
## rustls
arc-swap = { version = "1", optional = true }
bytes = "1"
futures-util = { version = "0.3", default-features = false, features = ["alloc"] }
http = "0.2"
http-body = "0.4"
hyper = { version = "0.14.27", features = ["http1", "http2", "server", "runtime"] }

## openssl
openssl = { version = "0.10", optional = true }
pin-project-lite = { version = "0.2", optional = true }
rustls = { version = "0.21", features = ["dangerous_configuration"], optional = true }
rustls-pemfile = { version = "1", optional = true }
tokio = { version = "1", features = ["macros", "net", "sync"] }
tokio-openssl = { version = "0.6", optional = true }
tokio-rustls = { version = "0.24", optional = true }
tower-service = "0.3"

## proxy-protocol
ppp = { version = "2.2.0", optional = true }
async-stream = "0.3.5"
bytes = "1.7.1"
futures = "0.3.30"
http = "1.1.0"
http-body = "1.0.1"
http-body-util = "0.1.2"
hyper = "1.4.1"
hyper-util = { version = "0.1.8", features = ["server", "tokio", "server-auto", "server-graceful", "service", "http2"] }
pin-project = "1.1.5"
pprof = { version = "0.13.0", features = ["flamegraph"], optional = true }
ring = "0.17.8"
rustls = { version = "0.23.13", features = ["zlib"] }
rustls-pemfile = "2.1.3"
tokio = { version = "1.40.0", features = ["net", "macros", "rt-multi-thread", "time"] }
tokio-rustls = "0.26.0"
tokio-stream = { version = "0.1.16", features = ["net"] }
tokio-util = "0.7.12"
tower = { version = "0.5.1", features = ["util"] }
tracing = "0.1.40"

[dev-dependencies]
axum = "0.6"
hyper = { version = "0.14", features = ["full"] }
tokio = { version = "1", features = ["full"] }
tower = { version = "0.4", features = ["util"] }
tower-http = { version = "0.4.4", features = ["add-extension"] }

[package.metadata.docs.rs]
all-features = true
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
rustdoc-args = ["--cfg", "docsrs"]
criterion = { version = "0.5.1", features = ["html_reports", "async_tokio"] }
hyper = { version = "1.4.1", features = ["client"] }
hyper-rustls = { version = "0.27.3", features = ["http1", "http2"] }
hyper-util = { version = "0.1.8", features = ["client", "client-legacy", "http2"] }
num_cpus = "1.16.0"
rcgen = "0.13.1"
reqwest = { version = "0.12.7", features = ["rustls-tls", "http2"] }
ring = "0.17.8"
tokio = { version = "1.40", features = ["rt-multi-thread", "net", "test-util", "time"] }
tokio-util = { version = "0.7.12", features = ["compat"] }
tracing-subscriber = "0.3.18"

[[bench]]
name = "hello_world_tower_hyper_tls_tcp"
harness = false

[[example]]
name = "from_std_listener_rustls"
required-features = ["tls-rustls"]
doc-scrape-examples = true

[[example]]
name = "http_and_https"
required-features = ["tls-rustls"]
doc-scrape-examples = true

[[example]]
name = "rustls_reload"
required-features = ["tls-rustls"]
doc-scrape-examples = true

[[example]]
name = "rustls_server"
required-features = ["tls-rustls"]
doc-scrape-examples = true
[features]
default = []
jemalloc = ["tikv-jemallocator"]
dev-profiling = ["pprof"]

[[example]]
name = "rustls_session"
required-features = ["tls-rustls"]
doc-scrape-examples = true
[profile.release]
debug = true
Loading

0 comments on commit 4706e3f

Please sign in to comment.