smithy-rs/settings.gradle.kts

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

31 lines
916 B
Plaintext
Raw Permalink Normal View History

2020-10-28 23:00:49 +08:00
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
2020-10-28 23:00:49 +08:00
*/
rootProject.name = "software.amazon.smithy.rust.codegen.smithy-rs"
include(":codegen-core")
include(":codegen-client")
include(":codegen-client-test")
[POC] Basic server type serde for RestJson1 (#737) * Initial implementation of RestJson and Http ser/de Signed-off-by: Bigo <1781140+crisidev@users.noreply.github.com> * Visitor render operation shapes from server generators Signed-off-by: Bigo <1781140+crisidev@users.noreply.github.com> * Use a symlink for the ebs test model * Revert "Use a symlink for the ebs test model" This reverts commit 0c2adcbf12f452959252134b7fbb9c70dab154c7. * Now the model is emitted in different files * A little more general model generation Signed-off-by: Bigo <1781140+crisidev@users.noreply.github.com> * Use a very simple model to try the service generators * Move serializer in its own folder * Initial implementation of RestJson and Http ser/de Signed-off-by: Bigo <1781140+crisidev@users.noreply.github.com> * Visitor render operation shapes from server generators Signed-off-by: Bigo <1781140+crisidev@users.noreply.github.com> * Use a symlink for the ebs test model * Revert "Use a symlink for the ebs test model" This reverts commit 0c2adcbf12f452959252134b7fbb9c70dab154c7. * Now the model is emitted in different files * A little more general model generation Signed-off-by: Bigo <1781140+crisidev@users.noreply.github.com> * Use a very simple model to try the service generators * Move serializer in its own folder * Refactor RestJson to accomodate upstream changes * Refactor a little RestJson1 and add simple RFC doc * Remove inheritance from Json ser/de and refactor codegen visitor to directly use the rendering functions * Make operation.rs module public * Use the protocol ID instead of its string representation Signed-off-by: Bigo <1781140+crisidev@users.noreply.github.com>
2021-10-06 01:05:00 +08:00
include(":codegen-server")
Add initial implementation of a Serde Decorator (#3753) ## Motivation and Context Customers want to be able to use `serde` with Smithy models. For details, see the [RFC](https://github.com/smithy-lang/smithy-rs/blob/configurable-serde/design/src/rfcs/rfc0045_configurable_serde.md) ## Description <!--- Why is this change required? What problem does it solve? --> <!--- If it fixes an open issue, please link to the issue here --> Implementation of `serde::Serialize` for smithy-rs code generators. This takes the approach of a trait, `SerializeConfigured` which _returns_ a type that implements `Serialize`. This allows customers to control serde behavior for their use case. ```rust /// Trait that allows configuring serialization /// **This trait should not be implemented directly!** Instead, `impl Serialize for ConfigurableSerdeRef<T>`** pub trait SerializeConfigured { /// Return a `Serialize` implementation for this object that owns the object. This is what you want /// If you need to pass something that `impl`s serialize elsewhere. fn serialize_owned(self, settings: SerializationSettings) -> impl Serialize; /// Return a `Serialize` implementation for this object that borrows from the given object fn serialize_ref<'a>(&'a self, settings: &'a SerializationSettings) -> impl Serialize + 'a; } ``` This can be used as follows: ```rust serde_json::to_string(&my_struct.serialize_ref(&SerializationSettings::redact_sensitive_fields()); ``` Currently, this codegen plugin is not used by anything. It can be enabled by bringing it in scope during code generation & adding the `@serde` trait to the model for the fields where serialization is desired. This will allow the SDK (if they choose to) roll it out only for specific types or services that have customer demand. There are a number of follow on items required: - [x] Ensure the generated impls work for `Server` codegen - [ ] Generate `Deserialize` implementations - [x] Test the implementation all Smithy protocol test models (ensure it compiles) ## Testing Unit test testing serialization with a kitchen-sink model ## 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._ --------- Co-authored-by: david-perez <d@vidp.dev>
2024-08-13 00:44:32 +08:00
include(":codegen-serde")
include(":codegen-server:python")
Initial implementation of Typescript server bindings (#2277) * A barely working code generation in typescript * Extract shared socket into feature inside aws-smithy-http-server * Building a fully functional application, I think * Add NAPI build.rs * Refactor all names to use typescript instead of js * Add (hopefully) the PR bot for TS * Clippy fixes * Fix documentation Signed-off-by: Daniele Ahmed <ahmeddan@amazon.de> * set_reuse_port in socket not on windows Signed-off-by: Daniele Ahmed <ahmeddan@amazon.de> * Add example implementation * Allow the new application to build * Remove all occurrences of Python * Simplify README * Fix issue with the codegen-diff-revision script * Try to prevent the ci-lint to bother us with TODO at this stage of development * Remove codegen-client from typescript dependencies Signed-off-by: Bigo <1781140+crisidev@users.noreply.github.com> * Add CODEOWNERS and fix some other linting issues * Add license * Prevent from running tests on typescript in Windows Signed-off-by: Bigo <1781140+crisidev@users.noreply.github.com> * Initial work to remove error from this PR * Update to call_async Signed-off-by: Daniele Ahmed <ahmeddan@amazon.de> * types/node in package.json Signed-off-by: Daniele Ahmed <ahmeddan@amazon.de> * Generate app.ts Signed-off-by: Daniele Ahmed <ahmeddan@amazon.de> * Improve makefile * Adapting code to the latest changes and removing runtime dependency (for now). * Removing rust-runtime/aws-smithy-http-server-typescript. * Making CI happy. * Restoring ServerCodegenDecorator to be like main. * Adding back the aws-smithy-http-server-typescript crate back. * Removing index.js file. --------- Signed-off-by: Daniele Ahmed <ahmeddan@amazon.de> Signed-off-by: Bigo <1781140+crisidev@users.noreply.github.com> Co-authored-by: 82marbag <69267416+82marbag@users.noreply.github.com> Co-authored-by: Alberto Pose <albepose@amazon.com>
2023-04-06 23:27:17 +08:00
include(":codegen-server:typescript")
[POC] Basic server type serde for RestJson1 (#737) * Initial implementation of RestJson and Http ser/de Signed-off-by: Bigo <1781140+crisidev@users.noreply.github.com> * Visitor render operation shapes from server generators Signed-off-by: Bigo <1781140+crisidev@users.noreply.github.com> * Use a symlink for the ebs test model * Revert "Use a symlink for the ebs test model" This reverts commit 0c2adcbf12f452959252134b7fbb9c70dab154c7. * Now the model is emitted in different files * A little more general model generation Signed-off-by: Bigo <1781140+crisidev@users.noreply.github.com> * Use a very simple model to try the service generators * Move serializer in its own folder * Initial implementation of RestJson and Http ser/de Signed-off-by: Bigo <1781140+crisidev@users.noreply.github.com> * Visitor render operation shapes from server generators Signed-off-by: Bigo <1781140+crisidev@users.noreply.github.com> * Use a symlink for the ebs test model * Revert "Use a symlink for the ebs test model" This reverts commit 0c2adcbf12f452959252134b7fbb9c70dab154c7. * Now the model is emitted in different files * A little more general model generation Signed-off-by: Bigo <1781140+crisidev@users.noreply.github.com> * Use a very simple model to try the service generators * Move serializer in its own folder * Refactor RestJson to accomodate upstream changes * Refactor a little RestJson1 and add simple RFC doc * Remove inheritance from Json ser/de and refactor codegen visitor to directly use the rendering functions * Make operation.rs module public * Use the protocol ID instead of its string representation Signed-off-by: Bigo <1781140+crisidev@users.noreply.github.com>
2021-10-06 01:05:00 +08:00
include(":codegen-server-test")
include(":codegen-server-test:python")
Initial implementation of Typescript server bindings (#2277) * A barely working code generation in typescript * Extract shared socket into feature inside aws-smithy-http-server * Building a fully functional application, I think * Add NAPI build.rs * Refactor all names to use typescript instead of js * Add (hopefully) the PR bot for TS * Clippy fixes * Fix documentation Signed-off-by: Daniele Ahmed <ahmeddan@amazon.de> * set_reuse_port in socket not on windows Signed-off-by: Daniele Ahmed <ahmeddan@amazon.de> * Add example implementation * Allow the new application to build * Remove all occurrences of Python * Simplify README * Fix issue with the codegen-diff-revision script * Try to prevent the ci-lint to bother us with TODO at this stage of development * Remove codegen-client from typescript dependencies Signed-off-by: Bigo <1781140+crisidev@users.noreply.github.com> * Add CODEOWNERS and fix some other linting issues * Add license * Prevent from running tests on typescript in Windows Signed-off-by: Bigo <1781140+crisidev@users.noreply.github.com> * Initial work to remove error from this PR * Update to call_async Signed-off-by: Daniele Ahmed <ahmeddan@amazon.de> * types/node in package.json Signed-off-by: Daniele Ahmed <ahmeddan@amazon.de> * Generate app.ts Signed-off-by: Daniele Ahmed <ahmeddan@amazon.de> * Improve makefile * Adapting code to the latest changes and removing runtime dependency (for now). * Removing rust-runtime/aws-smithy-http-server-typescript. * Making CI happy. * Restoring ServerCodegenDecorator to be like main. * Adding back the aws-smithy-http-server-typescript crate back. * Removing index.js file. --------- Signed-off-by: Daniele Ahmed <ahmeddan@amazon.de> Signed-off-by: Bigo <1781140+crisidev@users.noreply.github.com> Co-authored-by: 82marbag <69267416+82marbag@users.noreply.github.com> Co-authored-by: Alberto Pose <albepose@amazon.com>
2023-04-06 23:27:17 +08:00
include(":codegen-server-test:typescript")
include(":rust-runtime")
include(":aws:rust-runtime")
include(":aws:sdk")
include(":aws:sdk-adhoc-test")
include(":aws:sdk-codegen")
pluginManagement {
val smithyGradlePluginVersion: String by settings
plugins {
id("software.amazon.smithy.gradle.smithy-base") version smithyGradlePluginVersion
id("software.amazon.smithy.gradle.smithy-jar") version smithyGradlePluginVersion
}
}