Skip to content

Latest commit

 

History

History
17 lines (11 loc) · 630 Bytes

File metadata and controls

17 lines (11 loc) · 630 Bytes

pgmux

A lightweight PostgreSQL routing proxy library for Rust.

TLS / Crypto Provider

pgmux uses rustls with the ring crypto backend. If your binary's dependency tree also pulls in aws-lc-rs (e.g. via reqwest or hyper-rustls), rustls won't be able to auto-detect which provider to use and will panic at runtime.

Fix this by explicitly installing the provider early in your main():

rustls::crypto::ring::default_provider()
    .install_default()
    .expect("Failed to install rustls crypto provider");

This is especially important for static musl builds where aws-lc-rs may not compile at all.