#3433·axum

Consider moving `Listener` to `axum-core`

Author: FalkWoldmannCreated Aug 13, 2025Updated Jul 6, 2026
  • I have looked for existing issues (including closed) about this

Feature Request

Motivation

I am currently working on creating a TlsListener that implements axum's Listener trait (see https://github.com/tmccombs/tls-listener/issues/58). Right now, this trait is defined in the axum crate, which is a little annoying because this means that I need to pull all of axum just for this trait.

Proposal / Alternatives

My idea would be to move this trait to axum-core, but this might not be too easy due to the orphan rule. Alternatively, we could move the impls for TcpListener and UnixListener to axum-core as well and gate it and the additional dependencies behind some feature flag.