Skip to content

Commit

Permalink
update tcp-stream to 0.29
Browse files Browse the repository at this point in the history
Fixes !35
  • Loading branch information
Keruspe committed Jun 22, 2024
1 parent f90cfe2 commit fc52c62
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 5 deletions.
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,29 @@
[![API Docs](https://docs.rs/amq-protocol/badge.svg)](https://docs.rs/amq-protocol)
[![Build status](https://github.com/amqp-rs/amq-protocol/workflows/Build%20and%20test/badge.svg)](https://github.com/amqp-rs/amq-protocol/actions)
[![Downloads](https://img.shields.io/crates/d/amq-protocol.svg)](https://crates.io/crates/amq-protocol)

## Features

- codegen: force code generation (default to pregenerated sources)
- vendored-openssl: use a vendored openssl version instead of the system one (when using openssl backend)
- verbose-errors: enable more verbose errors in the AMQP parser

## TLS backends

- native-tls
- openssl
- rustls (default)

## Rustls certificates store

- rustls-native-certs (default)
- rustls-webpki-roots-certs

## Warning about crypto backends for rustls

A crypto implementation must be enabled in rustls using feature flags.
We mimic what rustls does, providing one feature flag per implementation and enabling the same as rustls by default.
Available options are:
- `rustls--aws_lc_rs` (default)
- `rustls--ring`

7 changes: 6 additions & 1 deletion protocol/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ rust-version = "1.63.0"
name = "amq_protocol"

[features]
default = ["native-tls"]
default = ["rustls"]
codegen = ["codegen-internal"]
codegen-internal = ["amq-protocol-codegen"]
native-tls = ["amq-protocol-tcp/native-tls"]
Expand All @@ -27,6 +27,11 @@ rustls-webpki-roots-certs = ["amq-protocol-tcp/rustls-webpki-roots-certs"]
vendored-openssl = ["amq-protocol-tcp/vendored-openssl"]
verbose-errors = ["amq-protocol-types/verbose-errors"]

# rustls crypto providers. Choose at least one. Otherwise, runtime errors.
# See https://docs.rs/rustls/latest/rustls/#crate-features. for more info
rustls--aws_lc_rs = ["amq-protocol-tcp/rustls--aws_lc_rs"] # default, but doesn't build everywhere
rustls--ring = ["amq-protocol-tcp/rustls--ring"] # more compatible, (e.g., easily builds on Windows)

[build-dependencies.amq-protocol-codegen]
version = "=7.2.0"
path = "../codegen"
Expand Down
13 changes: 9 additions & 4 deletions tcp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,23 @@ name = "amq_protocol_tcp"
default = ["rustls"]
native-tls = ["tcp-stream/native-tls"]
openssl = ["tcp-stream/openssl"]
rustls = ["rustls-native-certs"]
rustls-native-certs = ["tcp-stream/rustls-native-certs", "rustls-connector"]
rustls-webpki-roots-certs = ["tcp-stream/rustls-webpki-roots-certs", "rustls-connector"]
rustls = ["rustls-native-certs", "rustls--aws_lc_rs"]
rustls-native-certs = ["rustls-connector", "tcp-stream/rustls-native-certs"]
rustls-webpki-roots-certs = ["rustls-connector", "tcp-stream/rustls-webpki-roots-certs"]
rustls-connector = ["tcp-stream/rustls-connector"]
vendored-openssl = ["tcp-stream/vendored-openssl"]

# rustls crypto providers. Choose at least one. Otherwise, runtime errors.
# See https://docs.rs/rustls/latest/rustls/#crate-features. for more info
rustls--aws_lc_rs = ["tcp-stream/rustls--aws_lc_rs"] # default, but doesn't build everywhere
rustls--ring = ["tcp-stream/rustls--ring"] # more compatible, (e.g., easily builds on Windows)

[dependencies.amq-protocol-uri]
version = "=7.2.0"
path = "../uri"

[dependencies.tcp-stream]
version = "^0.28"
version = "^0.29"
default-features = false

[dependencies.tracing]
Expand Down

0 comments on commit fc52c62

Please sign in to comment.