-
- Downloads
Fix compiling S3 crate for wasm (#3590)
## Motivation and Context Running `cargo build --target wasm32-unknown-unknown --no-default-features` on an S3 crate has stopped working since https://github.com/smithy-lang/smithy-rs/pull/3465 with the following error: ``` error: the wasm*-unknown-unknown targets are not supported by default, you may need to enable the "js" feature. For more information see: https://docs.rs/getrandom/#webassembly-support --> /Users/[REDACTED]/.cargo/registry/src/index.crates.io-6f17d22bba15001f/getrandom-0.2.14/src/lib.rs:352:9 | 352 | / compile_error!("the wasm*-unknown-unknown targets are not supported by \ 353 | | default, you may need to enable the \"js\" feature. \ 354 | | For more information see: \ 355 | | https://docs.rs/getrandom/#webassembly-support"); | |________________________________________________________________________^ ``` To address the issue, this PR updates an S3's dependency on `ahash` in a way that disables default features. ## Testing Updated the existing test `integration-tests/webassembly` so that `check-aws-sdk-standalone-integration-tests` will run `cargo check` `aws-sdk-s3` against both `wasm32-wasi` and `wasm32-unknown-unknown` (the updated check would break if we removed `default-features = false` from the `ahash` dependency). ## Checklist - [x] 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._
Showing
- CHANGELOG.next.toml 8 additions, 1 deletionCHANGELOG.next.toml
- aws/rust-runtime/aws-inlineable/Cargo.toml 1 addition, 1 deletionaws/rust-runtime/aws-inlineable/Cargo.toml
- aws/sdk/integration-tests/test.sh 4 additions, 1 deletionaws/sdk/integration-tests/test.sh
- aws/sdk/integration-tests/webassembly/.cargo/config.toml 1 addition, 1 deletionaws/sdk/integration-tests/webassembly/.cargo/config.toml
- codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/rustlang/CargoDependency.kt 1 addition, 1 deletion...azon/smithy/rust/codegen/core/rustlang/CargoDependency.kt
- tools/ci-scripts/check-aws-sdk-standalone-integration-tests 1 addition, 1 deletiontools/ci-scripts/check-aws-sdk-standalone-integration-tests
Loading
Please register or sign in to comment