diff --git a/CHANGELOG.next.toml b/CHANGELOG.next.toml index 2739fcc120..84ffc76d30 100644 --- a/CHANGELOG.next.toml +++ b/CHANGELOG.next.toml @@ -33,4 +33,11 @@ author = "avandesa" message = "Change some credentials related info log messages to debug." references = ["smithy-rs#3546"] meta = { "breaking" = false, "tada" = false, "bug" = false } -author = "orf" \ No newline at end of file +author = "orf" + + +[[aws-sdk-rust]] +message = "Fix an S3 crate's dependency on `ahash` so the crate can be compiled for `wasm32-unknown-unknown`." +references = ["smithy-rs#3590", "aws-sdk-rust#1131"] +meta = { "breaking" = false, "tada" = false, "bug" = true } +author = "ysaito1001" diff --git a/aws/rust-runtime/aws-inlineable/Cargo.toml b/aws/rust-runtime/aws-inlineable/Cargo.toml index 66e8f7ff0b..4d987fe62f 100644 --- a/aws/rust-runtime/aws-inlineable/Cargo.toml +++ b/aws/rust-runtime/aws-inlineable/Cargo.toml @@ -15,7 +15,7 @@ repository = "https://github.com/smithy-lang/smithy-rs" # Used by lru, and this forces it to be a later version that avoids # https://github.com/tkaitchuck/aHash/issues/200 # when built with `cargo update -Z minimal-versions` -ahash = "0.8.11" +ahash = { version = "0.8.11", default-features = false } aws-credential-types = { path = "../aws-credential-types" } aws-runtime = { path = "../aws-runtime", features = ["http-02x"] } aws-sigv4 = { path = "../aws-sigv4" } diff --git a/aws/sdk/integration-tests/test.sh b/aws/sdk/integration-tests/test.sh index 88026f6d7c..6d230a73c6 100755 --- a/aws/sdk/integration-tests/test.sh +++ b/aws/sdk/integration-tests/test.sh @@ -16,7 +16,10 @@ for f in *; do else # The webassembly tests use a custom runner set in config.toml that # is not picked up when running the tests outside of the package - cd webassembly && cargo component test --all-features --all-targets && cd .. + # The tests are written for `wasm32-wasi` but the manifest config also specifies + # `wasm32-unknown-unknown` so we can ensure the test build on that platform as well. + # For executing the tests, however, we explicitly choose a target `wasm32-wasi`. + cd webassembly && cargo component test --all-features --target wasm32-wasi && cd .. fi fi done diff --git a/aws/sdk/integration-tests/webassembly/.cargo/config.toml b/aws/sdk/integration-tests/webassembly/.cargo/config.toml index 06b75c8e09..37f9ac58f5 100644 --- a/aws/sdk/integration-tests/webassembly/.cargo/config.toml +++ b/aws/sdk/integration-tests/webassembly/.cargo/config.toml @@ -1,5 +1,5 @@ [build] -target = "wasm32-wasi" +target = ["wasm32-unknown-unknown", "wasm32-wasi"] [target.wasm32-wasi] rustflags = ["-C", "opt-level=1"] diff --git a/codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/rustlang/CargoDependency.kt b/codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/rustlang/CargoDependency.kt index 07a6a4c02a..444f65a09e 100644 --- a/codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/rustlang/CargoDependency.kt +++ b/codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/rustlang/CargoDependency.kt @@ -244,7 +244,7 @@ data class CargoDependency( companion object { // Forces AHash to be a later version that avoids // https://github.com/tkaitchuck/aHash/issues/200 - val AHash: CargoDependency = CargoDependency("ahash", CratesIo("0.8.11")) + val AHash: CargoDependency = CargoDependency("ahash", CratesIo("0.8.11"), defaultFeatures = false) val OnceCell: CargoDependency = CargoDependency("once_cell", CratesIo("1.16")) val Url: CargoDependency = CargoDependency("url", CratesIo("2.3.1")) val Bytes: CargoDependency = CargoDependency("bytes", CratesIo("1.0.0")) diff --git a/tools/ci-scripts/check-aws-sdk-standalone-integration-tests b/tools/ci-scripts/check-aws-sdk-standalone-integration-tests index 9ba41631dc..cf843112e8 100755 --- a/tools/ci-scripts/check-aws-sdk-standalone-integration-tests +++ b/tools/ci-scripts/check-aws-sdk-standalone-integration-tests @@ -42,7 +42,7 @@ cargo check --tests --all-features # Running WebAssembly (WASI) specific integration tests pushd "${tmp_dir}/aws/sdk/integration-tests/webassembly" &>/dev/null -cargo check --tests --all-features +cargo check --tests --all-features --all-targets popd popd