Skip to content

Releases: smithy-lang/smithy-rs

v0.44.0 (June 22nd, 2022)

22 Jun 23:07
Compare
Choose a tag to compare
Pre-release

New this release:

  • (smithy-rs#1460) Fix a potential bug with ByteStream's implementation of futures_core::stream::Stream and add helpful error messages
    for users on 32-bit systems that try to stream HTTP bodies larger than 4.29Gb.
  • 🐛 (smithy-rs#1427, smithy-rs#1465, smithy-rs#1459) Fix RustWriter bugs for rustTemplate and docs utility methods

v0.43.0 (June 9th, 2022)

01 Jun 18:51
Compare
Choose a tag to compare
Pre-release

New this release:

  • 🎉 (smithy-rs#1381, @alonlud) Add ability to sign a request with all headers, or to change which headers are excluded from signing
  • 🎉 (smithy-rs#1390) Add method ByteStream::into_async_read. This makes it easy to convert ByteStreams into a struct implementing tokio:io::AsyncRead. Available on crate feature rt-tokio only.
  • (smithy-rs#1404, @petrosagg) Add ability to specify a different rust crate name than the one derived from the package name
  • (smithy-rs#1404, @petrosagg) Switch to RustCrypto's implementation of MD5.

Contributors
Thank you for your contributions! ❤

v0.42.0 (May 13th, 2022)

13 May 23:20
Compare
Choose a tag to compare
Pre-release

Breaking Changes:

  • ⚠🎉 (aws-sdk-rust#494, aws-sdk-rust#519) The aws_smithy_http::byte_stream::bytestream_util::FsBuilder has been updated to allow for easier creation of
    multi-part requests.

    • FsBuilder::offset is a new method allowing users to specify an offset to start reading a file from.
    • FsBuilder::file_size has been reworked into FsBuilder::length and is now used to specify the amount of data to read.

    With these two methods, it's now simple to create a ByteStream that will read a single "chunk" of a file. The example
    below demonstrates how you could divide a single File into consecutive chunks to create multiple ByteStreams.

    let example_file_path = Path::new("/example.txt");
    let example_file_size = tokio::fs::metadata(&example_file_path).await.unwrap().len();
    let chunks = 6;
    let chunk_size = file_size / chunks;
    let mut byte_streams = Vec::new();
    
    for i in 0..chunks {
        let length = if i == chunks - 1 {
            // If we're on the last chunk, the length to read might be less than a whole chunk.
            // We substract the size of all previous chunks from the total file size to get the
            // size of the final chunk.
            file_size - (i * chunk_size)
        } else {
            chunk_size
        };
    
        let byte_stream = ByteStream::read_from()
            .path(&file_path)
            .offset(i * chunk_size)
            .length(length)
            .build()
            .await?;
    
        byte_streams.push(byte_stream);
    }
    
    for chunk in byte_streams {
        // Make requests to a service
    }

New this release:

Contributors
Thank you for your contributions! ❤

v0.41.0 (April 28th 2022)

29 Apr 14:40
9b6210c
Compare
Choose a tag to compare
Pre-release

Breaking Changes:

  • ⚠ (smithy-rs#1318) Bump MSRV from 1.56.1 to 1.58.1 per our "two versions behind" policy.

New this release:

  • (smithy-rs#1307) Add new trait for HTTP body callbacks. This is the first step to enabling us to implement optional checksum verification of requests and responses.
  • (smithy-rs#1330) Upgrade to Smithy 1.21.0

0.40.2 (April 14th, 2022)

14 Apr 21:09
c5e2ce5
Compare
Choose a tag to compare
Pre-release

Breaking Changes:

New this release:

Contributors
Thank you for your contributions! ❤

0.39.0 (March 17, 2022)

17 Mar 21:20
61b0a8a
Compare
Choose a tag to compare
Pre-release

Breaking Changes:

  • ⚠ (aws-sdk-rust#406) aws_types::config::Config has been renamed to aws_types:sdk_config::SdkConfig. This is to better differentiate it
    from service-specific configs like aws_s3_sdk::Config. If you were creating shared configs with
    aws_config::load_from_env(), then you don't have to do anything. If you were directly referring to a shared config,
    update your use statements and struct names.

    Before:

    use aws_types::config::Config;
    
    fn main() {
        let config = Config::builder()
        // config builder methods...
        .build()
        .await;
    }

    After:

    use aws_types::SdkConfig;
    
    fn main() {
        let config = SdkConfig::builder()
        // config builder methods...
        .build()
        .await;
    }
  • ⚠ (smithy-rs#724) Timeout configuration has been refactored a bit. If you were setting timeouts through environment variables or an AWS
    profile, then you shouldn't need to change anything. Take note, however, that we don't currently support HTTP connect,
    read, write, or TLS negotiation timeouts. If you try to set any of those timeouts in your profile or environment, we'll
    log a warning explaining that those timeouts don't currently do anything.

    If you were using timeouts programmatically,
    you'll need to update your code. In previous versions, timeout configuration was stored in a single TimeoutConfig
    struct. In this new version, timeouts have been broken up into several different config structs that are then collected
    in a timeout::Config struct. As an example, to get the API per-attempt timeout in previous versions you would access
    it with <your TimeoutConfig>.api_call_attempt_timeout() and in this new version you would access it with
    <your timeout::Config>.api.call_attempt_timeout(). We also made some unimplemented timeouts inaccessible in order to
    avoid giving users the impression that setting them had an effect. We plan to re-introduce them once they're made
    functional in a future update.

New this release:

  • (smithy-rs#1225) DynMiddleware is now cloneable
  • (smithy-rs#1257) HTTP request property bag now contains list of desired HTTP versions to use when making requests. This list is not currently used but will be in an upcoming update.

0.38.0 (Februrary 24, 2022)

24 Feb 19:54
f7e1f08
Compare
Choose a tag to compare
Pre-release

Breaking Changes:

  • ⚠ (smithy-rs#1197) aws_smithy_types::retry::RetryKind had its NotRetryable variant split into UnretryableFailure and Unnecessary. If you implement the ClassifyResponse, then successful responses need to return Unnecessary, and failures that shouldn't be retried need to return UnretryableFailure.
  • ⚠ (smithy-rs#1209) aws_smithy_types::primitive::Encoder is now a struct rather than an enum, but its usage remains the same.
  • ⚠ (smithy-rs#1217) ClientBuilder helpers rustls() and native_tls() now return DynConnector and use dynamic dispatch rather than returning their concrete connector type that would allow static dispatch. If static dispatch is desired, then manually construct a connector to give to the builder. For example, for rustls: builder.connector(Adapter::builder().build(aws_smithy_client::conns::https())) (where Adapter is in aws_smithy_client::hyper_ext).

New this release:

  • 🐛 (smithy-rs#1197) Fixed a bug that caused clients to eventually stop retrying. The cross-request retry allowance wasn't being reimbursed upon receiving a successful response, so once this allowance reached zero, no further retries would ever be attempted.

v0.37.0 (February 18th, 2022)

21 Feb 15:28
058f28e
Compare
Choose a tag to compare
Pre-release

0.37.0 (February 18th, 2022)

Breaking Changes:

  • ⚠ (smithy-rs#1144) Some APIs required that timeout configuration be specified with an aws_smithy_client::timeout::Settings struct while
    others required an aws_smithy_types::timeout::TimeoutConfig struct. Both were equivalent. Now aws_smithy_types::timeout::TimeoutConfig
    is used everywhere and aws_smithy_client::timeout::Settings has been removed. Here's how to migrate code your code that
    depended on timeout::Settings:

    The old way:

    let timeout = timeout::Settings::new()
        .with_connect_timeout(Duration::from_secs(1))
        .with_read_timeout(Duration::from_secs(2));

    The new way:

    // This example is passing values, so they're wrapped in `Option::Some`. You can disable a timeout by passing `None`.
    let timeout = TimeoutConfig::new()
        .with_connect_timeout(Some(Duration::from_secs(1)))
        .with_read_timeout(Some(Duration::from_secs(2)));
  • ⚠ (smithy-rs#1085) Moved the following re-exports into a types module for all services:

    • <service>::AggregatedBytes -> <service>::types::AggregatedBytes
    • <service>::Blob -> <service>::types::Blob
    • <service>::ByteStream -> <service>::types::ByteStream
    • <service>::DateTime -> <service>::types::DateTime
    • <service>::SdkError -> <service>::types::SdkError
  • ⚠ (smithy-rs#1085) AggregatedBytes and ByteStream are now only re-exported if the service has streaming operations,
    and Blob/DateTime are only re-exported if the service uses them.

  • ⚠ (smithy-rs#1130) MSRV increased from 1.54 to 1.56.1 per our 2-behind MSRV policy.

New this release:

  • (smithy-rs#1144) MakeConnectorFn, HttpConnector, and HttpSettings have been moved from aws_config::provider_config to
    aws_smithy_client::http_connector. This is in preparation for a later update that will change how connectors are
    created and configured.
  • (smithy-rs#1123) Refactor Document shape parser generation
  • (smithy-rs#1085) The Client and Config re-exports now have their documentation inlined in the service docs

0.36.0 (January 26, 2022)

26 Jan 18:49
ed3daf6
Compare
Choose a tag to compare
Pre-release

New this release:

Contributors
Thank you for your contributions! ❤

0.35.2 (January 20th, 2022)

21 Jan 00:01
f4d3910
Compare
Choose a tag to compare
Pre-release

Changes only impact generated AWS SDK