Unverified Commit 35a90991 authored by Fahad Zubair's avatar Fahad Zubair Committed by GitHub
Browse files

Merge branch 'main' into fahadzub/cbor-constraint

parents fcf670df d8fbf47d
Loading
Loading
Loading
Loading

.changelog/4106176.md

0 → 100644
+9 −0
Original line number Diff line number Diff line
---
applies_to: ["server"]
authors: ["drganjoo"]
references: []
breaking: true
new_feature: false
bug_fix: false
---
The generated crates no longer have the `aws-lambda` feature flag enabled by default. This prevents the [aws-lambda](https://docs.rs/crate/aws-smithy-http-server/0.63.3/features#aws-lambda) feature from being automatically enabled in [aws-smithy-http-server](https://docs.rs/aws-smithy-http-server/0.63.3/aws_smithy_http_server/) when the SDK is not intended for AWS Lambda.

.changelog/9278363.md

0 → 100644
+10 −0
Original line number Diff line number Diff line
---
applies_to: ["server"]
authors: ["drganjoo"]
references: []
breaking: false
new_feature: true
bug_fix: false
---
All relevant types from [aws-smithy-http-server](https://docs.rs/aws-smithy-http-server/0.63.3/aws_smithy_http_server/) are now re-exported within the generated crates. This removes the need to explicitly depend on [aws-smithy-http-server](https://docs.rs/aws-smithy-http-server/0.63.3/aws_smithy_http_server/) in service handler code and prevents compilation errors caused by version mismatches.
+2 −1
Original line number Diff line number Diff line
@@ -82,11 +82,12 @@ sealed class RustModule {
            parent: RustModule = LibRs,
            documentationOverride: String? = null,
            additionalAttributes: List<Attribute> = emptyList(),
            inline: Boolean = false,
        ): LeafModule =
            new(
                name,
                visibility = Visibility.PUBLIC,
                inline = false,
                inline = inline,
                parent = parent,
                documentationOverride = documentationOverride,
                additionalAttributes = additionalAttributes,
+1 −1
Original line number Diff line number Diff line
@@ -41,8 +41,8 @@ object ServerRustModule {
    val Input = RustModule.public("input")
    val Output = RustModule.public("output")
    val Types = RustModule.public("types")
    val Server = RustModule.public("server")
    val Service = RustModule.private("service")
    val Server = RustModule.public("server", inline = true)

    val UnconstrainedModule =
        software.amazon.smithy.rust.codegen.core.smithy.UnconstrainedModule
+9 −1
Original line number Diff line number Diff line
@@ -51,11 +51,19 @@ class ServerRequiredCustomizations : ServerCodegenDecorator {
        rustCrate.mergeFeature(
            Feature(
                "aws-lambda",
                true,
                false,
                listOf("aws-smithy-http-server/aws-lambda"),
            ),
        )

        rustCrate.mergeFeature(
            Feature(
                "request-id",
                true,
                listOf("aws-smithy-http-server/request-id"),
            ),
        )

        rustCrate.withModule(ServerRustModule.Types) {
            pubUseSmithyPrimitives(codegenContext, codegenContext.model, rustCrate)(this)
            rustTemplate(
Loading