axum-server-maybetlsacceptor

Crates.ioaxum-server-maybetlsacceptor
lib.rsaxum-server-maybetlsacceptor
version0.8.0
created_at2025-11-17 18:17:58.724345+00
updated_at2025-12-08 15:29:56.284607+00
descriptionaxum-server-compatible enum that lets you easily accepts connections with or without TLS.
homepage
repositoryhttps://github.com/X2A-LIMITED/axum-server-maybetlsacceptor
max_upload_size
id1937292
size55,887
Pascal Giammelluca (pgiammel)

documentation

README

axum-server-maybtlsacceptor

axum-server-maybetlsacceptor is an axum-server-compatible enum that lets you easily accepts connections with or without TLS. The main goals were:

  • no duplication of routes, layers or other serving code to add the acceptor
  • no dynamic dispatch

pin-project was chosen instead of pin-project-lite because it does not play well with other attributes such as cfg.

Features

By default, no feature is enabled, meaning no TLS backend is available.

  • rustls: enable the rustls TLS backend
  • openssl: enable the openssl TLS backend

Compatibility

Version 0.8.x is compatible with axum-server version 0.8.y.

This crate's versioning will try to follow axum-server major versioning (or minor while being unstable 0.x.y).

Usage Example

You can find a basic example in examples/basic.rs

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Commit count: 0

cargo fmt