diff --git a/CHANGELOG.md b/CHANGELOG.md index 73cd86114e7fe82cdb6674397c63a3b10c8ebea9..c02f0c24621edcfc98e4b0eba130bb2f39e7913f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ vNext (Month Day, Year) ======================= - Add `RustSettings` to `CodegenContext` (smithy-rs#616, smithy-rs#752) +- Prepare crate manifests for publishing to crates.io (smithy-rs#755) v0.25.1 (October 11th, 2021) ========================= diff --git a/aws/SDK_CHANGELOG.md b/aws/SDK_CHANGELOG.md index ab164304220c2b72e1a16d0dedfe23ede761fb73..c153a5115cd18351840ab94e04eb014800192e8d 100644 --- a/aws/SDK_CHANGELOG.md +++ b/aws/SDK_CHANGELOG.md @@ -1,6 +1,11 @@ vNext (Month Day, Year) ======================= +- Prepare crate manifests for publishing to crates.io (smithy-rs#755) + +v0.0.20-alpha (October 7, 2021) +=============================== + **Breaking changes** - :warning: MSRV increased from 1.52.1 to 1.53.0 per our 3-behind MSRV policy. diff --git a/aws/rust-runtime/aws-auth/Cargo.toml b/aws/rust-runtime/aws-auth/Cargo.toml index 01f6d67950855e5c3e6c935b827c86f4b817d271..810f2d6271ef1135d2f46a5747ac3dab05127185 100644 --- a/aws/rust-runtime/aws-auth/Cargo.toml +++ b/aws/rust-runtime/aws-auth/Cargo.toml @@ -1,15 +1,16 @@ [package] name = "aws-auth" -version = "0.1.0" +version = "0.0.0-smithy-rs-head" authors = ["AWS Rust SDK Team ", "Russell Cohen "] -license = "Apache-2.0" +description = "AWS auth middleware." edition = "2018" +license = "Apache-2.0" +repository = "https://github.com/awslabs/smithy-rs" [features] rt-tokio = ["smithy-async/rt-tokio"] default = ["rt-tokio"] -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] pin-project = "1" smithy-async = { path = "../../../rust-runtime/smithy-async", default-features = false } diff --git a/aws/rust-runtime/aws-config/Cargo.toml b/aws/rust-runtime/aws-config/Cargo.toml index a8dde5aeab73abf4b178100a487c0e75e4c26ab9..026b408d9f6524f97c57609ae5043555747714a8 100644 --- a/aws/rust-runtime/aws-config/Cargo.toml +++ b/aws/rust-runtime/aws-config/Cargo.toml @@ -1,11 +1,13 @@ [package] name = "aws-config" -version = "0.1.0" +version = "0.0.0-smithy-rs-head" authors = ["AWS Rust SDK Team ", "Russell Cohen "] +description = "AWS SDK config and credential provider implementations." edition = "2018" exclude = ["test-data/*", "integration-tests/*"] +license = "Apache-2.0" +repository = "https://github.com/awslabs/smithy-rs" -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [features] default-provider = ["profile", "imds", "meta", "sts", "environment"] profile = ["sts", "web-identity-token", "meta", "environment", "imds"] diff --git a/rust-runtime/protocol-test-helpers/LICENSE b/aws/rust-runtime/aws-config/LICENSE similarity index 100% rename from rust-runtime/protocol-test-helpers/LICENSE rename to aws/rust-runtime/aws-config/LICENSE diff --git a/aws/rust-runtime/aws-endpoint/Cargo.toml b/aws/rust-runtime/aws-endpoint/Cargo.toml index b8d5ddf049a349de30826704b97c1b7dd26caf61..13e4737a19ac019d4886b2d8c477ec000fccd745 100644 --- a/aws/rust-runtime/aws-endpoint/Cargo.toml +++ b/aws/rust-runtime/aws-endpoint/Cargo.toml @@ -1,12 +1,11 @@ [package] name = "aws-endpoint" -version = "0.1.0" -authors = ["Russell Cohen "] +version = "0.0.0-smithy-rs-head" +authors = ["AWS Rust SDK Team ", "Russell Cohen "] +description = "AWS SDK endpoint support." edition = "2018" license = "Apache-2.0" -description = "AWS Endpoint Support" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html +repository = "https://github.com/awslabs/smithy-rs" [dependencies] smithy-http = { path = "../../../rust-runtime/smithy-http"} diff --git a/aws/rust-runtime/aws-http/Cargo.toml b/aws/rust-runtime/aws-http/Cargo.toml index cbdfcb1cd5dc00ea0689853a4849b3605b570d0c..7786e73f1a3c786103450758620ea2eb7a24d6a0 100644 --- a/aws/rust-runtime/aws-http/Cargo.toml +++ b/aws/rust-runtime/aws-http/Cargo.toml @@ -1,12 +1,11 @@ [package] name = "aws-http" -version = "0.1.0" -authors = ["Russell Cohen "] +version = "0.0.0-smithy-rs-head" +authors = ["AWS Rust SDK Team ", "Russell Cohen "] +description = "HTTP specific AWS SDK behaviors." edition = "2018" -description = "HTTP specific AWS SDK behaviors" license = "Apache-2.0" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html +repository = "https://github.com/awslabs/smithy-rs" [dependencies] aws-types = { path = "../aws-types" } diff --git a/aws/rust-runtime/aws-hyper/Cargo.toml b/aws/rust-runtime/aws-hyper/Cargo.toml index d40ed47e97b637d88e0d75d9eab48e71b8b2fd9c..4813eb0622c9b4863ee5a682424283359610e4af 100644 --- a/aws/rust-runtime/aws-hyper/Cargo.toml +++ b/aws/rust-runtime/aws-hyper/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "aws-hyper" -version = "0.1.0" -authors = ["Russell Cohen "] +version = "0.0.0-smithy-rs-head" +authors = ["AWS Rust SDK Team ", "Russell Cohen "] +description = "AWS SDK Tower middleware stack." edition = "2018" license = "Apache-2.0" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html +repository = "https://github.com/awslabs/smithy-rs" [features] default = [] diff --git a/aws/rust-runtime/aws-inlineable/Cargo.toml b/aws/rust-runtime/aws-inlineable/Cargo.toml index adc177ccafdf06b51188ec5d354576c255e3da18..4c60e795bd07743200e0801db34b5f84587c16fa 100644 --- a/aws/rust-runtime/aws-inlineable/Cargo.toml +++ b/aws/rust-runtime/aws-inlineable/Cargo.toml @@ -1,17 +1,19 @@ [package] name = "inlineable-aws" -version = "0.1.0" -authors = ["Russell Cohen "] -edition = "2018" +version = "0.0.0-smithy-rs-head" +authors = ["AWS Rust SDK Team ", "Russell Cohen "] description = """ The modules of this crate are intended to be inlined directly into the SDK as needed. The dependencies here are to allow this crate to be compilable and testable in isolation, no client code actually takes these dependencies. """ +edition = "2018" +license = "Apache-2.0" +publish = false +repository = "https://github.com/awslabs/smithy-rs" [dependencies] aws-types = { path = "../../rust-runtime/aws-types" } http = "0.2.4" smithy-http = { path = "../../../rust-runtime/smithy-http" } smithy-types = { path = "../../../rust-runtime/smithy-types" } -smithy-xml = { path = "../../../rust-runtime/smithy-xml" } tower = { version = "0.4", no-default-features = true } diff --git a/aws/rust-runtime/aws-inlineable/LICENSE b/aws/rust-runtime/aws-inlineable/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..67db8588217f266eb561f75fae738656325deac9 --- /dev/null +++ b/aws/rust-runtime/aws-inlineable/LICENSE @@ -0,0 +1,175 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. diff --git a/aws/rust-runtime/aws-sig-auth/Cargo.toml b/aws/rust-runtime/aws-sig-auth/Cargo.toml index ce967a6976be47b926e73392c6ed249fa4a5f441..3ef32fac2b22cd00782fa1449d54613cfb95483d 100644 --- a/aws/rust-runtime/aws-sig-auth/Cargo.toml +++ b/aws/rust-runtime/aws-sig-auth/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "aws-sig-auth" -version = "0.1.0" -authors = ["Russell Cohen "] +version = "0.0.0-smithy-rs-head" +authors = ["AWS Rust SDK Team ", "Russell Cohen "] +description = "SigV4 signing middleware for the AWS SDK." edition = "2018" license = "Apache-2.0" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html +repository = "https://github.com/awslabs/smithy-rs" [features] sign-eventstream = ["smithy-eventstream", "aws-sigv4/sign-eventstream"] @@ -14,7 +14,6 @@ default = [] [dependencies] http = "0.2.2" aws-sigv4 = { path = "../aws-sigv4" } -aws-auth = { path = "../aws-auth" } aws-types = { path = "../aws-types" } smithy-http = { path = "../../../rust-runtime/smithy-http" } smithy-eventstream = { path = "../../../rust-runtime/smithy-eventstream", optional = true } diff --git a/aws/rust-runtime/aws-sigv4/Cargo.toml b/aws/rust-runtime/aws-sigv4/Cargo.toml index 0a9588f0c9083121c02493f80949ae17e683e873..91bece3f019c5e56711987d2ae7531d538a2a65f 100644 --- a/aws/rust-runtime/aws-sigv4/Cargo.toml +++ b/aws/rust-runtime/aws-sigv4/Cargo.toml @@ -1,14 +1,15 @@ [package] name = "aws-sigv4" -version = "0.1.0" -authors = ["David Barsky ", "AWS Rust SDK Team "] +version = "0.0.0-smithy-rs-head" +authors = ["AWS Rust SDK Team ", "David Barsky "] +description = "SigV4 signer for HTTP requests and Event Stream messages." edition = "2018" exclude = ["aws-sig-v4-test-suite/*"] -license = "MIT OR Apache-2.0" -description = "AWS SigV4 signer" +license = "Apache-2.0" +repository = "https://github.com/awslabs/smithy-rs" [features] -sign-http = ["http", "http-body", "percent-encoding", "form_urlencoded"] +sign-http = ["http", "percent-encoding", "form_urlencoded"] sign-eventstream = ["smithy-eventstream", "bytes"] default = ["sign-http"] @@ -18,7 +19,6 @@ chrono = { version = "0.4", default-features = false, features = ["clock", "std" form_urlencoded = { version = "1.0", optional = true } hex = "0.4" http = { version = "0.2", optional = true } -http-body = { version = "0.4", optional = true } percent-encoding = { version = "2.1", optional = true } ring = "0.16" smithy-eventstream = { path = "../../../rust-runtime/smithy-eventstream", optional = true } @@ -26,5 +26,5 @@ tracing = "0.1" [dev-dependencies] bytes = "1" -pretty_assertions = "0.6" +pretty_assertions = "1.0" httparse = "1.5" diff --git a/aws/rust-runtime/aws-sigv4/LICENSE b/aws/rust-runtime/aws-sigv4/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..67db8588217f266eb561f75fae738656325deac9 --- /dev/null +++ b/aws/rust-runtime/aws-sigv4/LICENSE @@ -0,0 +1,175 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. diff --git a/aws/rust-runtime/aws-types/Cargo.toml b/aws/rust-runtime/aws-types/Cargo.toml index 6523a5b2aac65de5a255e14a9325b88d8c73cd55..ae8d9125b1b6bbc45f59ff4bafe0af4cdc63d750 100644 --- a/aws/rust-runtime/aws-types/Cargo.toml +++ b/aws/rust-runtime/aws-types/Cargo.toml @@ -1,14 +1,13 @@ [package] name = "aws-types" -version = "0.1.0" -authors = ["Russell Cohen "] +version = "0.0.0-smithy-rs-head" +authors = ["AWS Rust SDK Team ", "Russell Cohen "] +description = "Cross-service types for the AWS SDK." edition = "2018" license = "Apache-2.0" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html +repository = "https://github.com/awslabs/smithy-rs" [dependencies] -tracing = "0.1" smithy-async = { path = "../../../rust-runtime/smithy-async" } smithy-types = { path = "../../../rust-runtime/smithy-types" } zeroize = "1.4.1" diff --git a/aws/sdk/build.gradle.kts b/aws/sdk/build.gradle.kts index 7335cfbb672872117137c593d3a31d5741117184..79318020113477115c9a5dc8df1540a9f64e75cd 100644 --- a/aws/sdk/build.gradle.kts +++ b/aws/sdk/build.gradle.kts @@ -2,6 +2,7 @@ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ + import software.amazon.smithy.model.Model import software.amazon.smithy.model.shapes.ServiceShape import software.amazon.smithy.aws.traits.ServiceTrait @@ -21,13 +22,13 @@ val smithyVersion: String by project val sdkOutputDir = buildDir.resolve("aws-sdk") val runtimeModules = listOf( - "protocol-test-helpers", "smithy-async", "smithy-client", "smithy-eventstream", "smithy-http", "smithy-http-tower", "smithy-json", + "smithy-protocol-test", "smithy-query", "smithy-types", "smithy-xml" @@ -221,6 +222,7 @@ fun generateSmithyBuild(tests: List): String { "module": "aws-sdk-${it.module}", "moduleVersion": "${getProperty("aws.sdk.version")}", "moduleAuthors": ["AWS Rust SDK Team ", "Russell Cohen "], + "moduleRepository": "https://github.com/awslabs/aws-sdk-rust", "license": "Apache-2.0" ${it.extraConfig ?: ""} } @@ -236,7 +238,6 @@ fun generateSmithyBuild(tests: List): String { """ } - task("generateSmithyBuild") { description = "generate smithy-build.json" inputs.property("servicelist", awsServices.sortedBy { it.module }.toString()) @@ -289,39 +290,75 @@ task("relocateExamples") { outputs.dir(sdkOutputDir) } -tasks.register("relocateAwsRuntime") { - from("$rootDir/aws/rust-runtime") - awsModules.forEach { - include("$it/**") - } - exclude("**/target") - exclude("**/Cargo.lock") - filter { line -> rewritePathDependency(line) } - into(sdkOutputDir) -} - /** * The aws/rust-runtime crates depend on local versions of the Smithy core runtime enabling local compilation. However, * those paths need to be replaced in the final build. We should probably fix this with some symlinking. */ fun rewritePathDependency(line: String): String { - // some runtime crates are actually dependent on the generated bindings: return line.replace("../sdk/build/aws-sdk/", "") // others use relative dependencies:: .replace("../../rust-runtime/", "") } -tasks.register("relocateRuntime") { +fun rewriteCrateVersion(line: String, version: String): String = line.replace( + """^\s*version\s+=\s+"0.0.0-smithy-rs-head"$""".toRegex(), + "version = \"$version\"" +) + +/** + * AWS runtime crate versions are all `0.0.0-smithy-rs-head`. When copying over to the AWS SDK, + * these should be changed to the AWS SDK version. + */ +fun rewriteAwsSdkCrateVersion(line: String): String = rewriteCrateVersion(line, getProperty("aws.sdk.version")!!) + +/** + * Smithy runtime crate versions in smithy-rs are all `0.0.0-smithy-rs-head`. When copying over to the AWS SDK, + * these should be changed to the smithy-rs version. + */ +fun rewriteSmithyRsCrateVersion(line: String): String = + rewriteCrateVersion(line, getProperty("smithy.rs.runtime.crate.version")!!) + +/** Patches a file with the result of the given `operation` being run on each line */ +fun patchFile(path: String, operation: (String) -> String) { + val patchedContents = File(path).readLines().joinToString("\n", transform = operation) + File(path).writeText(patchedContents) +} + +tasks.register("copyAllRuntimes") { + from("$rootDir/aws/rust-runtime") { + awsModules.forEach { include("$it/**") } + } from("$rootDir/rust-runtime") { - runtimeModules.forEach { - include("$it/**") - } - exclude("**/target") - exclude("**/Cargo.lock") + runtimeModules.forEach { include("$it/**") } } + exclude("**/target") + exclude("**/Cargo.lock") into(sdkOutputDir) } +tasks.register("relocateAwsRuntime") { + dependsOn("copyAllRuntimes") + doLast { + // Patch the Cargo.toml files + awsModules.forEach { moduleName -> + patchFile("$sdkOutputDir/$moduleName/Cargo.toml") { line -> + line.let(::rewritePathDependency) + .let(::rewriteAwsSdkCrateVersion) + } + } + } +} +tasks.register("relocateRuntime") { + dependsOn("copyAllRuntimes") + doLast { + // Patch the Cargo.toml files + runtimeModules.forEach { moduleName -> + patchFile("$sdkOutputDir/$moduleName/Cargo.toml") { line -> + line.let(::rewriteSmithyRsCrateVersion) + } + } + } +} fun generateCargoWorkspace(services: List): String { val generatedModules = services.map { it.module }.toSet() diff --git a/aws/sdk/gradle.properties b/aws/sdk/gradle.properties index afdbe3aaaae0f015c3a5d8ebd2c41b7a49c5b069..7365a0624e091f2ccb6450f8e3e74eecbcb0199d 100644 --- a/aws/sdk/gradle.properties +++ b/aws/sdk/gradle.properties @@ -5,6 +5,7 @@ # Version number to use for the generated SDK aws.sdk.version=0.0.20-alpha +smithy.rs.runtime.crate.version=0.25.1-alpha # several services are broken pending custom work: # Glacier requires a customization which is not currently supported: diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/rustlang/CargoDependency.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/rustlang/CargoDependency.kt index 44c9e07d61b8c3b4a464e1d0d2c545661d494834..1751724dd7fb336f0f77aa7361c09654d568d8ab 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/rustlang/CargoDependency.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/rustlang/CargoDependency.kt @@ -9,7 +9,6 @@ import software.amazon.smithy.codegen.core.SymbolDependency import software.amazon.smithy.codegen.core.SymbolDependencyContainer import software.amazon.smithy.rust.codegen.smithy.RuntimeConfig import software.amazon.smithy.rust.codegen.smithy.RuntimeType -import software.amazon.smithy.rust.codegen.smithy.crateLocation import software.amazon.smithy.rust.codegen.util.dq sealed class DependencyScope { @@ -143,6 +142,8 @@ data class CargoDependency( is Local -> "local" } + fun rustName(name: String): RuntimeType = RuntimeType(name, this, this.name.replace("-", "_")) + fun toMap(): Map { val attribs = mutableMapOf() with(location) { @@ -201,9 +202,8 @@ data class CargoDependency( fun SmithyHttp(runtimeConfig: RuntimeConfig) = runtimeConfig.runtimeCrate("http") fun SmithyHttpTower(runtimeConfig: RuntimeConfig) = runtimeConfig.runtimeCrate("http-tower") - fun ProtocolTestHelpers(runtimeConfig: RuntimeConfig) = CargoDependency( - "protocol-test-helpers", runtimeConfig.runtimeCrateLocation.crateLocation(), scope = DependencyScope.Dev - ) + fun SmithyProtocolTestHelpers(runtimeConfig: RuntimeConfig) = + runtimeConfig.runtimeCrate("protocol-test").copy(scope = DependencyScope.Dev) fun smithyJson(runtimeConfig: RuntimeConfig): CargoDependency = runtimeConfig.runtimeCrate("json") fun smithyQuery(runtimeConfig: RuntimeConfig): CargoDependency = runtimeConfig.runtimeCrate("query") diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/RuntimeTypes.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/RuntimeTypes.kt index 50169d3d70b361125f3c8341a69de82c88b18050..8e901551be0cab1afbc5edc1819c83fe3fb80344 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/RuntimeTypes.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/RuntimeTypes.kt @@ -152,7 +152,7 @@ data class RuntimeType(val name: String?, val dependency: RustDependency?, val n fun ProtocolTestHelper(runtimeConfig: RuntimeConfig, func: String): RuntimeType = RuntimeType( - func, CargoDependency.ProtocolTestHelpers(runtimeConfig), "protocol_test_helpers" + func, CargoDependency.SmithyProtocolTestHelpers(runtimeConfig), "smithy_protocol_test" ) val http = CargoDependency.Http.asType() diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/RustSettings.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/RustSettings.kt index bbd1966d34cc36ce13ac5e9aac38fa876b536f5c..55094c7bd8c12bef8e04443a3598144aeacf671f 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/RustSettings.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/RustSettings.kt @@ -24,6 +24,7 @@ private const val MODULE_NAME = "module" private const val MODULE_DESCRIPTION = "moduleDescription" private const val MODULE_VERSION = "moduleVersion" private const val MODULE_AUTHORS = "moduleAuthors" +private const val MODULE_REPOSITORY = "moduleRepository" private const val RUNTIME_CONFIG = "runtimeConfig" private const val CODEGEN_SETTINGS = "codegen" private const val LICENSE = "license" @@ -73,6 +74,7 @@ class RustSettings( val moduleName: String, val moduleVersion: String, val moduleAuthors: List, + val moduleRepository: String?, val runtimeConfig: RuntimeConfig, val codegenConfig: CodegenConfig, val license: String?, @@ -114,6 +116,7 @@ class RustSettings( MODULE_DESCRIPTION, MODULE_AUTHORS, MODULE_VERSION, + MODULE_REPOSITORY, RUNTIME_CONFIG, CODEGEN_SETTINGS, LICENSE @@ -129,12 +132,14 @@ class RustSettings( val runtimeConfig = config.getObjectMember(RUNTIME_CONFIG) val codegenSettings = config.getObjectMember(CODEGEN_SETTINGS) val moduleAuthors = config.expectArrayMember(MODULE_AUTHORS).map { it.expectStringNode().value } + val moduleRepository = config.getStringMember(MODULE_REPOSITORY).orNull()?.value val license = config.getStringMember(LICENSE).orNull()?.value return RustSettings( service = service, moduleName = moduleName, moduleVersion = version, moduleAuthors = moduleAuthors, + moduleRepository = moduleRepository, runtimeConfig = RuntimeConfig.fromNode(runtimeConfig), codegenConfig = CodegenConfig.fromNode(codegenSettings), license = license, diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/CargoTomlGenerator.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/CargoTomlGenerator.kt index a32c16c839c8cbb727e1946b677243e938da2533..b36c76c475eb39737af50ac7a161e5d551756e17 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/CargoTomlGenerator.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/CargoTomlGenerator.kt @@ -27,15 +27,16 @@ class CargoTomlGenerator( "package" to mapOf( "name" to settings.moduleName, "version" to settings.moduleVersion, - "description" to settings.moduleDescription, "authors" to settings.moduleAuthors, - "license" to settings.license, + "description" to settings.moduleDescription, "edition" to "2018", + "license" to settings.license, + "repository" to settings.moduleRepository, ), - "dependencies" to dependencies.filter { it.scope == DependencyScope.Compile }.map { it.name to it.toMap() } - .toMap(), - "dev-dependencies" to dependencies.filter { it.scope == DependencyScope.Dev }.map { it.name to it.toMap() } - .toMap(), + "dependencies" to dependencies.filter { it.scope == DependencyScope.Compile } + .associate { it.name to it.toMap() }, + "dev-dependencies" to dependencies.filter { it.scope == DependencyScope.Dev } + .associate { it.name to it.toMap() }, "features" to cargoFeatures.toMap() ) writer.writeWithNoFormatting(TomlWriter().write(cargoToml)) diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/protocol/ProtocolTestGenerator.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/protocol/ProtocolTestGenerator.kt index f62d49b0cb46da074e696efc56c04be7f09a6db8..fb69386677327c38c5121f823f72bf39596720fa 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/protocol/ProtocolTestGenerator.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/protocol/ProtocolTestGenerator.kt @@ -417,7 +417,7 @@ class ProtocolTestGenerator( } /** - * wraps `inner` in a call to `protocol_test_helpers::assert_ok`, a convenience wrapper + * wraps `inner` in a call to `smithy_protocol_test::assert_ok`, a convenience wrapper * for pretty prettying protocol test helper results */ private fun assertOk(rustWriter: RustWriter, inner: RustWriter.() -> Unit) { diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/testutil/Rust.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/testutil/Rust.kt index 0f41b342fd4a0073f038cd029b9173279b669a73..76be89a49b8b1409c40ff95393860617458e829f 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/testutil/Rust.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/testutil/Rust.kt @@ -191,6 +191,7 @@ fun TestWriterDelegator.rustSettings(stubModel: Model) = "test_${baseDir.toFile().nameWithoutExtension}", "0.0.1", moduleAuthors = listOf("test@module.com"), + moduleRepository = null, runtimeConfig = TestRuntimeConfig, codegenConfig = CodegenConfig(), license = null, diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/testutil/TestHelpers.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/testutil/TestHelpers.kt index 02ff12ce7ef2c86df667b81a61c4038552dfc5f4..d703dbf0b5a88b8ad9faaa6e309fec0943c48415 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/testutil/TestHelpers.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/testutil/TestHelpers.kt @@ -39,10 +39,21 @@ fun testRustSettings( moduleName: String = "test-module", moduleVersion: String = "notrelevant", moduleAuthors: List = listOf("notrelevant"), + moduleRepository: String? = null, runtimeConfig: RuntimeConfig = RuntimeConfig(), codegenConfig: CodegenConfig = CodegenConfig(), license: String? = null -) = RustSettings(service, moduleName, moduleVersion, moduleAuthors, runtimeConfig, codegenConfig, license, model) +) = RustSettings( + service, + moduleName, + moduleVersion, + moduleAuthors, + moduleRepository, + runtimeConfig, + codegenConfig, + license, + model +) fun testSymbolProvider(model: Model, serviceShape: ServiceShape? = null): RustSymbolProvider = RustCodegenPlugin.baseSymbolProvider( diff --git a/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/serialize/EventStreamMarshallerGeneratorTest.kt b/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/serialize/EventStreamMarshallerGeneratorTest.kt index 91cce746ab3c11b45b883deb2cca16d6a27702ee..e226a4fb4c85e4d4426833322cab3b14285f9adf 100644 --- a/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/serialize/EventStreamMarshallerGeneratorTest.kt +++ b/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/serialize/EventStreamMarshallerGeneratorTest.kt @@ -12,7 +12,6 @@ import software.amazon.smithy.rust.codegen.rustlang.CargoDependency import software.amazon.smithy.rust.codegen.rustlang.DependencyScope import software.amazon.smithy.rust.codegen.rustlang.rustTemplate import software.amazon.smithy.rust.codegen.smithy.CodegenContext -import software.amazon.smithy.rust.codegen.smithy.RuntimeType import software.amazon.smithy.rust.codegen.smithy.protocols.EventStreamTestModels import software.amazon.smithy.rust.codegen.smithy.protocols.EventStreamTestTools import software.amazon.smithy.rust.codegen.testutil.TestRuntimeConfig @@ -47,7 +46,7 @@ class EventStreamMarshallerGeneratorTest { ) test.project.lib { writer -> - val protocolTestHelpers = CargoDependency.ProtocolTestHelpers(TestRuntimeConfig) + val protocolTestHelpers = CargoDependency.SmithyProtocolTestHelpers(TestRuntimeConfig) .copy(scope = DependencyScope.Compile) writer.rustTemplate( """ @@ -72,8 +71,8 @@ class EventStreamMarshallerGeneratorTest { HeaderValue::String(value.into()) } """, - "validate_body" to RuntimeType("validate_body", protocolTestHelpers, "protocol_test_helpers"), - "MediaType" to RuntimeType("MediaType", protocolTestHelpers, "protocol_test_helpers"), + "validate_body" to protocolTestHelpers.rustName("validate_body"), + "MediaType" to protocolTestHelpers.rustName("MediaType"), ) writer.unitTest( diff --git a/rust-runtime/Cargo.toml b/rust-runtime/Cargo.toml index a37cb6d5e7563c1c5877760b3d5190d06ef077a0..e0e50e7431be3a7953cbbf63455a1e49b1bf6ced 100644 --- a/rust-runtime/Cargo.toml +++ b/rust-runtime/Cargo.toml @@ -1,14 +1,15 @@ [workspace] members = [ + "inlineable", "smithy-async", - "smithy-http", "smithy-client", "smithy-eventstream", + "smithy-http", "smithy-http-tower", "smithy-json", + "smithy-protocol-test", "smithy-query", "smithy-types", - "smithy-xml", - "inlineable" + "smithy-xml" ] diff --git a/rust-runtime/inlineable/Cargo.toml b/rust-runtime/inlineable/Cargo.toml index c2823e826d96fcddfe9f9f908c8ff17bf762e6b7..101ef63c30ee827fe4d637c55569bfb7c325e106 100644 --- a/rust-runtime/inlineable/Cargo.toml +++ b/rust-runtime/inlineable/Cargo.toml @@ -1,20 +1,21 @@ [package] name = "inlineable" -version = "0.1.0" +version = "0.0.0-smithy-rs-head" authors = ["AWS Rust SDK Team ", "Russell Cohen "] edition = "2018" description = """ The modules of this crate are intended to be inlined directly into the SDK as needed. The dependencies here are to allow this crate to be compilable and testable in isolation, no client code actually takes these dependencies. """ +license = "Apache-2.0" +publish = false +repository = "https://github.com/awslabs/smithy-rs" [dependencies] "bytes" = "1" "http" = "0.2.1" "smithy-types" = { path = "../smithy-types" } -"smithy-http" = { path = "../smithy-http" } "smithy-json" = { path = "../smithy-json" } -"smithy-query" = { path = "../smithy-query" } "smithy-xml" = { path = "../smithy-xml" } "fastrand" = "1" diff --git a/rust-runtime/smithy-async/Cargo.toml b/rust-runtime/smithy-async/Cargo.toml index 6487beb7202a2dfe696f3e4931f0e63fbf28b762..5657bf00ea5653d4404459080ea89ea8222f5839 100644 --- a/rust-runtime/smithy-async/Cargo.toml +++ b/rust-runtime/smithy-async/Cargo.toml @@ -1,8 +1,11 @@ [package] name = "smithy-async" -version = "0.1.0" +version = "0.0.0-smithy-rs-head" authors = ["AWS Rust SDK Team ", "John DiSanti "] +description = "Async runtime agnostic abstractions for smithy-rs." edition = "2018" +license = "Apache-2.0" +repository = "https://github.com/awslabs/smithy-rs" [features] rt-tokio = ["tokio"] diff --git a/rust-runtime/smithy-async/LICENSE b/rust-runtime/smithy-async/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..67db8588217f266eb561f75fae738656325deac9 --- /dev/null +++ b/rust-runtime/smithy-async/LICENSE @@ -0,0 +1,175 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. diff --git a/rust-runtime/smithy-client/Cargo.toml b/rust-runtime/smithy-client/Cargo.toml index e338b25ac51c5425dcaf306969a9eb215932bb0a..1f01541fbe5824a10c31c6a72fb7bf6f35d17666 100644 --- a/rust-runtime/smithy-client/Cargo.toml +++ b/rust-runtime/smithy-client/Cargo.toml @@ -1,15 +1,15 @@ [package] name = "smithy-client" -version = "0.1.0" -authors = ["Russell Cohen "] +version = "0.0.0-smithy-rs-head" +authors = ["AWS Rust SDK Team ", "Russell Cohen "] +description = "Client for smithy-rs." edition = "2018" license = "Apache-2.0" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html +repository = "https://github.com/awslabs/smithy-rs" [features] rt-tokio = ["smithy-async/rt-tokio"] -test-util = ["protocol-test-helpers", "serde/derive"] +test-util = ["smithy-protocol-test", "serde/derive"] default = ["hyper", "rustls", "rt-tokio"] native-tls = ["hyper", "hyper-tls", "rt-tokio"] rustls = ["hyper", "hyper-rustls", "rt-tokio", "lazy_static"] @@ -34,7 +34,7 @@ lazy_static = { version = "1", optional = true } pin-project = "1" tracing = "0.1" -protocol-test-helpers = { path = "../protocol-test-helpers", optional = true } +smithy-protocol-test = { path = "../smithy-protocol-test", optional = true } serde = { version = "1", features = ["derive"], optional = true } [dev-dependencies] diff --git a/rust-runtime/smithy-client/src/dvr/replay.rs b/rust-runtime/smithy-client/src/dvr/replay.rs index f80bfcafd546a298e6f616ac0f83b515058ce81c..91c1914819116f361d778c5653e5deb4eea9f912 100644 --- a/rust-runtime/smithy-client/src/dvr/replay.rs +++ b/rust-runtime/smithy-client/src/dvr/replay.rs @@ -98,7 +98,7 @@ impl ReplayingConnection { )) }) .collect::>(); - protocol_test_helpers::validate_headers(&actual, expected_headers.as_slice())?; + smithy_protocol_test::validate_headers(&actual, expected_headers.as_slice())?; } Ok(()) } diff --git a/rust-runtime/smithy-client/src/test_connection.rs b/rust-runtime/smithy-client/src/test_connection.rs index 5b8f4c742e109b23919804fe152294ae352b4471..2f256729985d9c3b299f3e647d216dbecdecdfa6 100644 --- a/rust-runtime/smithy-client/src/test_connection.rs +++ b/rust-runtime/smithy-client/src/test_connection.rs @@ -10,7 +10,7 @@ use http::header::{HeaderName, CONTENT_TYPE}; use http::Request; -use protocol_test_helpers::{assert_ok, validate_body, MediaType}; +use smithy_protocol_test::{assert_ok, validate_body, MediaType}; use smithy_http::body::SdkBody; use smithy_http::result::ConnectorError; diff --git a/rust-runtime/smithy-eventstream/Cargo.toml b/rust-runtime/smithy-eventstream/Cargo.toml index c476f807dfa7814588f7d7748ce92011c6b2197e..57b582db7d1c1576aa5357c137fabd8069a656ad 100644 --- a/rust-runtime/smithy-eventstream/Cargo.toml +++ b/rust-runtime/smithy-eventstream/Cargo.toml @@ -1,8 +1,11 @@ [package] name = "smithy-eventstream" -version = "0.1.0" +version = "0.0.0-smithy-rs-head" authors = ["AWS Rust SDK Team ", "John DiSanti "] +description = "Event stream logic for smithy-rs." edition = "2018" +license = "Apache-2.0" +repository = "https://github.com/awslabs/smithy-rs" [features] derive-arbitrary = ["arbitrary"] diff --git a/rust-runtime/smithy-eventstream/LICENSE b/rust-runtime/smithy-eventstream/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..67db8588217f266eb561f75fae738656325deac9 --- /dev/null +++ b/rust-runtime/smithy-eventstream/LICENSE @@ -0,0 +1,175 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. diff --git a/rust-runtime/smithy-http-tower/Cargo.toml b/rust-runtime/smithy-http-tower/Cargo.toml index 9389c0e78da69e62711d540c536175ea5543d7d0..50cf94c41913c64d5351cc2ed4a7f5d78170b134 100644 --- a/rust-runtime/smithy-http-tower/Cargo.toml +++ b/rust-runtime/smithy-http-tower/Cargo.toml @@ -1,12 +1,11 @@ [package] name = "smithy-http-tower" -version = "0.1.0" -authors = ["Russell Cohen "] +version = "0.0.0-smithy-rs-head" +authors = ["AWS Rust SDK Team ", "Russell Cohen "] +description = "Tower-compatible shims for smithy-rs middleware." edition = "2018" -description = "Tower compatible shims for Smithy middleware" license = "Apache-2.0" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html +repository = "https://github.com/awslabs/smithy-rs" [dependencies] smithy-http = { path = "../smithy-http" } diff --git a/rust-runtime/smithy-http/Cargo.toml b/rust-runtime/smithy-http/Cargo.toml index dfafbadb05c438695a623e0954fb2f35014f0c06..a1d7495ab9da82a00dc28ded1280bd71e3dee455 100644 --- a/rust-runtime/smithy-http/Cargo.toml +++ b/rust-runtime/smithy-http/Cargo.toml @@ -1,9 +1,11 @@ [package] name = "smithy-http" -version = "0.0.1" -authors = ["rcoh@amazon.com"] +version = "0.0.0-smithy-rs-head" +authors = ["AWS Rust SDK Team ", "Russell Cohen "] +description = "Smithy HTTP logic for smithy-rs." edition = "2018" license = "Apache-2.0" +repository = "https://github.com/awslabs/smithy-rs" [features] bytestream-util = ["tokio/fs", "tokio-util/io"] diff --git a/rust-runtime/smithy-json/Cargo.toml b/rust-runtime/smithy-json/Cargo.toml index 243bc1dc2e2d385fce29f121e36d938324a573d7..fd09d173ba85b2f43bc293c546054ae105cbb299 100644 --- a/rust-runtime/smithy-json/Cargo.toml +++ b/rust-runtime/smithy-json/Cargo.toml @@ -1,8 +1,11 @@ [package] name = "smithy-json" -version = "0.1.0" +version = "0.0.0-smithy-rs-head" authors = ["AWS Rust SDK Team ", "John DiSanti "] +description = "Token streaming JSON parser for smithy-rs." edition = "2018" +license = "Apache-2.0" +repository = "https://github.com/awslabs/smithy-rs" [dependencies] smithy-types = { path = "../smithy-types" } diff --git a/rust-runtime/smithy-json/LICENSE b/rust-runtime/smithy-json/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..67db8588217f266eb561f75fae738656325deac9 --- /dev/null +++ b/rust-runtime/smithy-json/LICENSE @@ -0,0 +1,175 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. diff --git a/rust-runtime/protocol-test-helpers/Cargo.toml b/rust-runtime/smithy-protocol-test/Cargo.toml similarity index 50% rename from rust-runtime/protocol-test-helpers/Cargo.toml rename to rust-runtime/smithy-protocol-test/Cargo.toml index d7fe042ecf4e062471d8c38df9dda85ea96341bd..317e654d5d0d0f7a70a65db219b9d27f156fed70 100644 --- a/rust-runtime/protocol-test-helpers/Cargo.toml +++ b/rust-runtime/smithy-protocol-test/Cargo.toml @@ -1,10 +1,11 @@ [package] -name = "protocol-test-helpers" -version = "0.1.0" -authors = ["Russell Cohen "] +name = "smithy-protocol-test" +version = "0.0.0-smithy-rs-head" +authors = ["AWS Rust SDK Team ", "Russell Cohen "] +description = "A collection of library functions to validate HTTP requests against Smithy protocol tests." edition = "2018" -description = "A collection of library functions to validate HTTP requests against Smithy protocol tests" license = "Apache-2.0" +repository = "https://github.com/awslabs/smithy-rs" [dependencies] http = "0.2.1" @@ -14,5 +15,5 @@ regex = "1.5" # Not perfect for our needs, but good for now assert-json-diff = "1" -pretty_assertions = "0.7.2" +pretty_assertions = "1.0" roxmltree = "0.14.1" diff --git a/rust-runtime/smithy-protocol-test/LICENSE b/rust-runtime/smithy-protocol-test/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..67db8588217f266eb561f75fae738656325deac9 --- /dev/null +++ b/rust-runtime/smithy-protocol-test/LICENSE @@ -0,0 +1,175 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. diff --git a/rust-runtime/protocol-test-helpers/src/lib.rs b/rust-runtime/smithy-protocol-test/src/lib.rs similarity index 100% rename from rust-runtime/protocol-test-helpers/src/lib.rs rename to rust-runtime/smithy-protocol-test/src/lib.rs diff --git a/rust-runtime/protocol-test-helpers/src/urlencoded.rs b/rust-runtime/smithy-protocol-test/src/urlencoded.rs similarity index 100% rename from rust-runtime/protocol-test-helpers/src/urlencoded.rs rename to rust-runtime/smithy-protocol-test/src/urlencoded.rs diff --git a/rust-runtime/protocol-test-helpers/src/xml.rs b/rust-runtime/smithy-protocol-test/src/xml.rs similarity index 100% rename from rust-runtime/protocol-test-helpers/src/xml.rs rename to rust-runtime/smithy-protocol-test/src/xml.rs diff --git a/rust-runtime/smithy-query/Cargo.toml b/rust-runtime/smithy-query/Cargo.toml index 256f49428b6e6626979c653f7a249f4765c0abc9..55bb43bef28169ebab2f0f888f342009b05a2f0a 100644 --- a/rust-runtime/smithy-query/Cargo.toml +++ b/rust-runtime/smithy-query/Cargo.toml @@ -1,8 +1,11 @@ [package] name = "smithy-query" -version = "0.1.0" +version = "0.0.0-smithy-rs-head" authors = ["AWS Rust SDK Team ", "John DiSanti "] +description = "AWSQuery and EC2Query Smithy protocol logic for smithy-rs." edition = "2018" +license = "Apache-2.0" +repository = "https://github.com/awslabs/smithy-rs" [dependencies] urlencoding = "1.3" diff --git a/rust-runtime/smithy-query/LICENSE b/rust-runtime/smithy-query/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..67db8588217f266eb561f75fae738656325deac9 --- /dev/null +++ b/rust-runtime/smithy-query/LICENSE @@ -0,0 +1,175 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. diff --git a/rust-runtime/smithy-types/Cargo.toml b/rust-runtime/smithy-types/Cargo.toml index b3afda617ef5cb7357a8c474b58da5454f7a961d..6e4356fa671ed7eb933fe558241f1f8f3de3f066 100644 --- a/rust-runtime/smithy-types/Cargo.toml +++ b/rust-runtime/smithy-types/Cargo.toml @@ -1,9 +1,11 @@ [package] name = "smithy-types" -version = "0.0.1" -authors = ["rcoh@amazon.com"] +version = "0.0.0-smithy-rs-head" +authors = ["AWS Rust SDK Team ", "Russell Cohen "] +description = "Types for smithy-rs codegen." edition = "2018" license = "Apache-2.0" +repository = "https://github.com/awslabs/smithy-rs" [features] chrono-conversions = [] diff --git a/rust-runtime/smithy-xml/Cargo.toml b/rust-runtime/smithy-xml/Cargo.toml index edeb2393e3e73306b992d6b9ee237b0679a5f647..ae938de227778fbef7e72fa835b267a7768ced11 100644 --- a/rust-runtime/smithy-xml/Cargo.toml +++ b/rust-runtime/smithy-xml/Cargo.toml @@ -1,8 +1,11 @@ [package] name = "smithy-xml" -version = "0.1.0" +version = "0.0.0-smithy-rs-head" authors = ["AWS Rust SDK Team ", "Russell Cohen "] +description = "XML parsing logic for Smithy protocols." edition = "2018" +license = "Apache-2.0" +repository = "https://github.com/awslabs/smithy-rs" [dependencies] xmlparser = "=0.13.3" @@ -11,4 +14,4 @@ thiserror = "1" [dev-dependencies] proptest = "1" base64 = "0.13.0" -protocol-test-helpers = { path = "../protocol-test-helpers" } +smithy-protocol-test = { path = "../smithy-protocol-test" } diff --git a/rust-runtime/smithy-xml/src/encode.rs b/rust-runtime/smithy-xml/src/encode.rs index 9e68d7795fab1ea83495f5eb4d9ed4e1cc8c4dc4..e3538e15466250298f22ae9af42fcb63932cb6c1 100644 --- a/rust-runtime/smithy-xml/src/encode.rs +++ b/rust-runtime/smithy-xml/src/encode.rs @@ -163,7 +163,7 @@ impl ScopeWriter<'_, '_> { #[cfg(test)] mod test { use crate::encode::XmlWriter; - use protocol_test_helpers::{assert_ok, validate_body, MediaType}; + use smithy_protocol_test::{assert_ok, validate_body, MediaType}; #[test] fn forgot_finish() { diff --git a/rust-runtime/smithy-xml/tests/handwritten_serializers.rs b/rust-runtime/smithy-xml/tests/handwritten_serializers.rs index 4b21e23b2ffe544076bb85d22c5dcc9ff60eb4f6..b00bb04acab9297ddd05886d107491135f8e7876 100644 --- a/rust-runtime/smithy-xml/tests/handwritten_serializers.rs +++ b/rust-runtime/smithy-xml/tests/handwritten_serializers.rs @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0. */ -use protocol_test_helpers::{validate_body, MediaType}; +use smithy_protocol_test::{validate_body, MediaType}; use smithy_xml::encode; use smithy_xml::encode::ScopeWriter;