Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.7.0 Legos #17

Merged
merged 45 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from 34 commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
b3e4255
chore: tabula rasa
0xAlcibiades Sep 10, 2024
cc0d0dc
chore: scaffold dependencies
0xAlcibiades Sep 10, 2024
f5c8c60
feat: working impl of a tower lambda service/server
0xAlcibiades Sep 10, 2024
2d27fb7
feat: well factored http connection handling
0xAlcibiades Sep 10, 2024
4d9bc67
chore: document http connection server
0xAlcibiades Sep 10, 2024
8e66463
feat: tcp incoming
0xAlcibiades Sep 10, 2024
42beb88
chore: docs
0xAlcibiades Sep 10, 2024
82e39be
feat: higher level server and tests for http
0xAlcibiades Sep 10, 2024
215d7be
chore: add docs
0xAlcibiades Sep 10, 2024
6a20e2e
fix: cleanup
0xAlcibiades Sep 10, 2024
8192854
fix: expose builder pattern
0xAlcibiades Sep 10, 2024
25d98a3
feat: basic cut of TLS
0xAlcibiades Sep 10, 2024
5113505
feat: basic TLS
0xAlcibiades Sep 10, 2024
fb2cc7f
chore: docs
0xAlcibiades Sep 10, 2024
116c27d
feat: add file loader helpers
0xAlcibiades Sep 11, 2024
386e93a
fix: add basic error handling and docs
0xAlcibiades Sep 11, 2024
7333d38
chore: add TLS tests
0xAlcibiades Sep 11, 2024
9ad12d8
fix: dry code
0xAlcibiades Sep 11, 2024
3f4374f
feat: expose public functions
0xAlcibiades Sep 11, 2024
be3ad7f
chore: cleanup and expose API
0xAlcibiades Sep 11, 2024
f116059
fix: bump MSRV
0xAlcibiades Sep 11, 2024
7c2867d
fix: bump MSRV 2
0xAlcibiades Sep 11, 2024
840ca81
chore: add new readme
0xAlcibiades Sep 11, 2024
4e40caf
fix: version
0xAlcibiades Sep 11, 2024
479cc86
fix: remove usage example for now
0xAlcibiades Sep 11, 2024
9ea325e
feat: worked example in full
0xAlcibiades Sep 11, 2024
897e8ce
fix: address feedback
0xAlcibiades Sep 11, 2024
9b2847e
fix: line break
0xAlcibiades Sep 11, 2024
2b04c43
chore: basic benchmark
0xAlcibiades Sep 11, 2024
20c6709
fix: benchmarks that run
0xAlcibiades Sep 11, 2024
04d88eb
fix: fast benchmarks
0xAlcibiades Sep 11, 2024
d4c2458
fix: upgrade connection when possible
0xAlcibiades Sep 11, 2024
3e2757f
chore: cleanup
0xAlcibiades Sep 11, 2024
ea358ba
chore: enhance benchmarks
0xAlcibiades Sep 11, 2024
091f0d8
Basic optimizations (#18)
0xAlcibiades Sep 11, 2024
66c09f2
feat: add flamegraphs to benchmarks
0xAlcibiades Sep 11, 2024
05b3de1
feat: feature flag perf flamegraphs
0xAlcibiades Sep 11, 2024
7487eb6
chore: optimized tls config
0xAlcibiades Sep 11, 2024
e3b3425
fix: rename and revectorize benchmarks
0xAlcibiades Sep 12, 2024
ff7b439
fix: optimize server for generality
0xAlcibiades Sep 12, 2024
968a496
feat: optimize server and document
0xAlcibiades Sep 12, 2024
1d00462
fix: remove oops
0xAlcibiades Sep 12, 2024
01e7947
fix: clippy
0xAlcibiades Sep 12, 2024
2f6ba6c
fix: cleanup udeps
0xAlcibiades Sep 12, 2024
31ff9aa
feat: use http2 in bench
0xAlcibiades Sep 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
99 changes: 32 additions & 67 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,79 +1,44 @@
[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"

[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"]
version = "0.7.0"

[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-rustls = "0.27.3"
hyper-util = { version = "0.1.8", features = ["server", "tokio", "server-auto", "server-graceful", "service"] }
pin-project = "1.1.5"
rand = "0.9.0-alpha.2"
rustls = "0.23.13"
rustls-pemfile = "2.1.3"
tokio = { version = "1.40.0", features = ["net", "macros", "rt-multi-thread"] }
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"]

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

[[example]]
name = "rustls_session"
required-features = ["tls-rustls"]
doc-scrape-examples = true
criterion = { version = "0.5.1", features = ["html_reports", "async_tokio"] }
0xAlcibiades marked this conversation as resolved.
Show resolved Hide resolved
hyper = { version = "1.4.1", features = ["client"] }
tokio = { version = "1.0", features = ["rt", "net", "test-util"] }
0xAlcibiades marked this conversation as resolved.
Show resolved Hide resolved
tokio-util = { version = "0.7", features = ["compat"] }
0xAlcibiades marked this conversation as resolved.
Show resolved Hide resolved
tracing-subscriber = "0.3.18"

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