Unverified Commit f68b5eea authored by Russell Cohen's avatar Russell Cohen Committed by GitHub
Browse files

Add Initial Support for Hyper 1.0 (#3461)

## Motivation and Context
- #1925 

## Description
This adds a minimal Hyper client, focusing on not exposing any unstable
APIs. For this reason, the `Client::Builder` customization API is not
exposed anymore. We do this because at some point in the future, we will
likely move away from the hyper-util based Client.

The code for this was lifted directly from the Hyper 0.14 implementation
but updated for new traits.

However, this does come with some new valuable pieces:
1. Support for aws-lc (no FIPS yet)
2. Support for providing a custom DNS resolver

## Testing
- E2E test with Hyper. A Canary should also be added
(https://github.com/awslabs/aws-sdk-rust/issues/1089)

## Checklist
<!--- If a checkbox below is not applicable, then please DELETE it
rather than leaving it unchecked -->
- [ ] I have updated `CHANGELOG.next.toml` if I made changes to the
smithy-rs codegen or runtime crates
- [ ] I have updated `CHANGELOG.next.toml` if I made changes to the AWS
SDK, generated SDK code, or SDK runtime crates

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
parent 58a14caa
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ allow = [
confidence-threshold = 1.0
exceptions = [
    { allow = ["OpenSSL"], name = "ring", version = "*" },
    { allow = ["OpenSSL"], name = "aws-lc-sys", version = "*" },
]

[[licenses.clarify]]
+1 −10
Original line number Diff line number Diff line
@@ -194,16 +194,7 @@ jobs:
    - run: vcpkg install openssl:x64-windows-static-md
    - name: Run tests
      shell: bash
      run: |
        for runtime_path in "rust-runtime" "aws/rust-runtime"; do
          pushd "${runtime_path}" &>/dev/null
          # aws-smithy-http-server-python cannot be compiled on Windows since it uses the `signal-hook` crate
          # which is not really yet fully supported on the platform.
          # aws-smithy-http-server-typescript cannot be compiled right now on Windows.
          cargo test --all-features --workspace --exclude aws-smithy-http-server-python --exclude aws-smithy-http-server-typescript
          cargo doc --no-deps --document-private-items --all-features --workspace --exclude aws-smithy-http-server-python --exclude aws-smithy-http-server-typescript
          popd &>/dev/null
        done
      run: tools/ci-scripts/test-windows.sh

  # We make sure that smithy-rs can be compiled on platforms that are not
  # natively supported by GitHub actions. We run as many tests as we can on
+1 −2
Original line number Diff line number Diff line
[package]
name = "aws-sigv4"
version = "1.1.8"
version = "1.1.9"
authors = ["AWS Rust SDK Team <aws-sdk-rust@amazon.com>", "David Barsky <me@davidbarsky.com>"]
description = "SigV4 signer for HTTP requests and Event Stream messages."
edition = "2021"
@@ -28,7 +28,6 @@ hex = "0.4"
hmac = "0.12"
http0 = { version = "0.2", optional = true, package = "http" }
http = { version = "1", optional = true }
num-bigint = { version = "0.4.2", optional = true }
once_cell = "1.8"
p256 = { version = "0.11", features = ["ecdsa"], optional = true }
percent-encoding = { version = "2.1", optional = true }
+4 −0
Original line number Diff line number Diff line
@@ -45,3 +45,7 @@ rustdoc-args = ["--cfg", "docsrs"]
#  Crate("aws-types", STABLE_VERSION_PROP_NAME),
[package.metadata.smithy-rs-release-tooling]
stable = true

[package.metadata.cargo-udeps.ignore]
# used only in doc strings
normal = ["aws-smithy-runtime", "hyper-rustls"]
+2 −0
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@ import software.amazon.smithy.rust.codegen.core.rustlang.CargoDependency.Compani
import software.amazon.smithy.rust.codegen.core.rustlang.CargoDependency.Companion.TracingAppender
import software.amazon.smithy.rust.codegen.core.rustlang.CargoDependency.Companion.TracingSubscriber
import software.amazon.smithy.rust.codegen.core.rustlang.CargoDependency.Companion.TracingTest
import software.amazon.smithy.rust.codegen.core.rustlang.CargoDependency.Companion.smithyExperimental
import software.amazon.smithy.rust.codegen.core.rustlang.CargoDependency.Companion.smithyProtocolTestHelpers
import software.amazon.smithy.rust.codegen.core.rustlang.CargoDependency.Companion.smithyRuntime
import software.amazon.smithy.rust.codegen.core.rustlang.CargoDependency.Companion.smithyRuntimeApiTestUtil
@@ -145,6 +146,7 @@ class S3TestDependencies(private val codegenContext: ClientCodegenContext) : Lib
    override fun section(section: LibRsSection): Writable =
        writable {
            addDependency(awsConfig(codegenContext.runtimeConfig).toDevDependency().withFeature("behavior-version-latest"))
            addDependency(smithyExperimental(codegenContext.runtimeConfig).toDevDependency())
            addDependency(AsyncStd)
            addDependency(BytesUtils.toDevDependency())
            addDependency(FastRand.toDevDependency())
Loading