Skip to content

Commit

Permalink
Updated axum-server to v0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
daxpedda committed Jul 30, 2024
1 parent 83aff34 commit 560930d
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 18 deletions.
32 changes: 19 additions & 13 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,19 @@ env:

jobs:
build-test:
name: Build & Test
name: Build & Test - ${{ matrix.rust.description }}${{ matrix.features.description }}

runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
rust:
- { version: 1.66, msrv: true }
- { version: stable, msrv: false }
- { description: MSRV, version: 1.66, msrv: true }
- { description: Stable, version: stable, msrv: false }
features:
- { description: "", features: "" }
- { description: " (no default features)", features: "--no-default-features" }

steps:
- name: Checkout
Expand All @@ -36,39 +39,42 @@ jobs:
if: matrix.rust.msrv == true
run: cargo update -p tokio --precise 1.38.1
- name: Build
run: cargo build
run: cargo build ${{ matrix.features.features }}
- name: Documentation
run: cargo doc --no-deps
run: cargo doc --no-deps ${{ matrix.features.features }}
- name: Test
if: matrix.rust.msrv == false
run: cargo test --all-targets --no-fail-fast
run: cargo test --all-targets --no-fail-fast ${{ matrix.features.features }}
- name: Documentation Test
if: matrix.rust.msrv == false
run: cargo test --doc --no-fail-fast
run: cargo test --doc --no-fail-fast ${{ matrix.features.features }}

minimal-versions:
name: Minimal Versions
name: Minimal Versions - ${{ matrix.rust.description }}${{ matrix.features.description }}

runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
rust:
- 1.66
- stable
- { description: MSRV, version: 1.66 }
- { description: Stable, version: stable }
features:
- { description: "", features: "" }
- { description: " (no default features)", features: "--no-default-features" }

steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust
run: |
rustup toolchain install ${{ matrix.rust }} --profile minimal
rustup default ${{ matrix.rust }}
rustup toolchain install ${{ matrix.rust.version }} --profile minimal
rustup default ${{ matrix.rust.version }}
- name: Install nightly Rust
run: rustup toolchain install nightly --profile minimal
- name: Build
working-directory: minimal-versions
run: |
cargo +nightly update -Z minimal-versions
cargo build
cargo build ${{ matrix.features.features }}
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,18 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project
adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Added

- Default feature now enables the `aws-lc-rs`
[`CryptoProvider`](https://docs.rs/rustls/0.23/rustls/crypto/struct.CryptoProvider.html).

### Changed

- Updated `axum-server` to v0.7.
- Updated `tokio-rustls` to v0.26.

## [0.6.0] - 2023-12-22

### Added
Expand Down
19 changes: 15 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,18 @@ repository = "https://github.com/daxpedda/axum-server-dual-protocol"
rust-version = "1.66"
version = "0.6.0"

[features]
default = ["rustls/aws-lc-rs"]

[dependencies]
axum-server = { version = "0.6", features = ["tls-rustls"] }
axum-server = { version = "0.7", default-features = false, features = ["tls-rustls-no-provider"] }
bytes = { version = "1", default-features = false }
http = "1"
http-body-util = "0.1"
pin-project = "1"
rustls = { version = "0.23", default-features = false }
tokio = "1"
tokio-rustls = { version = "0.24", default-features = false }
tokio-rustls = { version = "0.26", default-features = false }
tokio-util = "0.7.1"
tower-layer = "0.3"
tower-service = "0.3"
Expand All @@ -32,10 +36,17 @@ anyhow = "1"
axum = { version = "0.7", default-features = false }
futures-util = { version = "0.3", default-features = false }
hyper = "1"
rcgen = { version = "0.13", default-features = false, features = ["ring"] }
reqwest = { version = "0.12", default-features = false, features = ["rustls-tls-manual-roots"] }
rcgen = { version = "0.13", default-features = false, features = ["aws_lc_rs"] }
reqwest = { version = "0.12", default-features = false, features = [
"rustls-tls-manual-roots-no-provider",
] }
rustls = { version = "0.23", features = ["aws-lc-rs"] }
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }

[patch.crates-io]
axum-server = { git = "https://github.com/daxpedda/axum-server", branch = "crypto-provider" }
rcgen = { git = "https://github.com/daxpedda/rcgen", branch = "aws-lc-rs-default-features" }

[[test]]
name = "util"
path = "tests/util.rs"
Expand Down
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ let app = Router::new()
.layer(UpgradeHttpLayer);
```

## Features

### `default`

By default the [`aws-lc-rs`] [`CryptoProvider`] is enabled.

## Conditional Configurations

### `docsrs`
Expand Down Expand Up @@ -91,10 +97,12 @@ additional terms or conditions.
[CHANGELOG]: https://github.com/daxpedda/axum-server-dual-protocol/blob/v0.6.0/CHANGELOG.md
[LICENSE-MIT]: https://github.com/daxpedda/axum-server-dual-protocol/blob/v0.6.0/LICENSE-MIT
[LICENSE-APACHE]: https://github.com/daxpedda/axum-server-dual-protocol/blob/v0.6.0/LICENSE-APACHE
[`aws-lc-rs`]: https://docs.rs/aws-lc-rs/1
[`axum`]: https://docs.rs/axum/0.7
[`axum-server`]: https://docs.rs/axum-server/0.6.0
[`axum-server`]: https://docs.rs/axum-server/0.7.0
[`bind_dual_protocol()`]:
https://docs.rs/axum-server-dual-protocol/0.6.0/axum_server_dual_protocol/fn.bind_dual_protocol.html
[`CryptoProvider`]: https://docs.rs/rustls/0.23/rustls/crypto/struct.CryptoProvider.html
[`hyper`]: https://docs.rs/hyper/1
[`Layer`]: https://docs.rs/tower-layer/0.3/tower_layer/trait.Layer.html
[`Router`]: https://docs.rs/axum/0.7/axum/struct.Router.html
Expand Down
8 changes: 8 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,12 @@
//! # .serve(app.into_make_service());
//! ```
//!
//! # Features
//!
//! ## `default`
//!
//! By default the [`aws-lc-rs`] [`CryptoProvider`] is enabled.
//!
//! # Conditional Configurations
//!
//! ## `docsrs`
Expand Down Expand Up @@ -120,7 +126,9 @@
//! [CHANGELOG]: https://github.com/daxpedda/axum-server-dual-protocol/blob/v0.6.0/CHANGELOG.md
//! [LICENSE-MIT]: https://github.com/daxpedda/axum-server-dual-protocol/blob/v0.6.0/LICENSE-MIT
//! [LICENSE-APACHE]: https://github.com/daxpedda/axum-server-dual-protocol/blob/v0.6.0/LICENSE-APACHE
//! [`aws-lc-rs`]: https://docs.rs/aws-lc-rs/1
//! [`axum`]: https://docs.rs/axum/0.7
//! [`CryptoProvider`]: tokio_rustls::rustls::crypto::CryptoProvider
//! [`hyper`]: https://docs.rs/hyper/1
//! [`Router`]: https://docs.rs/axum/0.7/axum/struct.Router.html
//! [`tower`]: https://docs.rs/tower/0.4
Expand Down

0 comments on commit 560930d

Please sign in to comment.