From 2b620e9ec27a5a4963811832bd4ac54aaac59a70 Mon Sep 17 00:00:00 2001 From: Andy Jewell Date: Wed, 4 Dec 2024 11:03:28 -0500 Subject: [PATCH 01/11] chore: make dafny runtime publishable --- releases/rust/db_esdk/dafny_runtime_rust/Cargo.toml | 8 +++++++- releases/rust/db_esdk/dafny_runtime_rust/README.md | 3 +++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 releases/rust/db_esdk/dafny_runtime_rust/README.md diff --git a/releases/rust/db_esdk/dafny_runtime_rust/Cargo.toml b/releases/rust/db_esdk/dafny_runtime_rust/Cargo.toml index d5244c747..8f190839e 100644 --- a/releases/rust/db_esdk/dafny_runtime_rust/Cargo.toml +++ b/releases/rust/db_esdk/dafny_runtime_rust/Cargo.toml @@ -1,7 +1,13 @@ [package] -name = "dafny_runtime" +name = "aws-dafny-runtime" version = "0.1.0" edition = "2021" +keywords = ["dafny"] +license = "ISC AND (Apache-2.0 OR ISC)" +description = "aws-dafny-runtime is the runtime support library for Rust code gerated from Dafny." +repository = "https://github.com/aws/aws-database-encryption-sdk-dynamodb/tree/main/releases/rust/db_esdk/dafny_runtime_rust" +authors = ["AWS-CryptoTools"] +readme = "README.md" [dependencies] once_cell = "1.18.0" diff --git a/releases/rust/db_esdk/dafny_runtime_rust/README.md b/releases/rust/db_esdk/dafny_runtime_rust/README.md new file mode 100644 index 000000000..eea7fda83 --- /dev/null +++ b/releases/rust/db_esdk/dafny_runtime_rust/README.md @@ -0,0 +1,3 @@ +This is the runtime support library for Rust code gerated from Dafny. + +It will probably be deprecated, once the Dafny team publishes their own. From 2af5fd536f905c8509581ca8e666e29d1c2f8b95 Mon Sep 17 00:00:00 2001 From: Andy Jewell Date: Wed, 4 Dec 2024 11:10:17 -0500 Subject: [PATCH 02/11] m --- releases/rust/db_esdk/Cargo.toml | 2 +- releases/rust/db_esdk/dafny_runtime_rust/Cargo.toml | 4 ++-- releases/rust/db_esdk/dafny_runtime_rust/README.md | 2 -- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/releases/rust/db_esdk/Cargo.toml b/releases/rust/db_esdk/Cargo.toml index e63880bf1..30204e051 100644 --- a/releases/rust/db_esdk/Cargo.toml +++ b/releases/rust/db_esdk/Cargo.toml @@ -24,7 +24,7 @@ aws-sdk-kms = "1.50.0" aws-smithy-runtime-api = {version = "1.7.3", features = ["client"] } aws-smithy-types = "1.2.9" chrono = "0.4.38" -dafny_runtime = { path = "./dafny_runtime_rust"} +dafny_runtime = "0.1.0" dashmap = "6.1.0" pem = "3.0.4" tokio = {version = "1.41.1", features = ["full"] } diff --git a/releases/rust/db_esdk/dafny_runtime_rust/Cargo.toml b/releases/rust/db_esdk/dafny_runtime_rust/Cargo.toml index 8f190839e..b9a97103c 100644 --- a/releases/rust/db_esdk/dafny_runtime_rust/Cargo.toml +++ b/releases/rust/db_esdk/dafny_runtime_rust/Cargo.toml @@ -1,10 +1,10 @@ [package] -name = "aws-dafny-runtime" +name = "dafny-runtime" version = "0.1.0" edition = "2021" keywords = ["dafny"] license = "ISC AND (Apache-2.0 OR ISC)" -description = "aws-dafny-runtime is the runtime support library for Rust code gerated from Dafny." +description = "dafny-runtime is the runtime support library for Rust code gerated from Dafny." repository = "https://github.com/aws/aws-database-encryption-sdk-dynamodb/tree/main/releases/rust/db_esdk/dafny_runtime_rust" authors = ["AWS-CryptoTools"] readme = "README.md" diff --git a/releases/rust/db_esdk/dafny_runtime_rust/README.md b/releases/rust/db_esdk/dafny_runtime_rust/README.md index eea7fda83..e336b5dfe 100644 --- a/releases/rust/db_esdk/dafny_runtime_rust/README.md +++ b/releases/rust/db_esdk/dafny_runtime_rust/README.md @@ -1,3 +1 @@ This is the runtime support library for Rust code gerated from Dafny. - -It will probably be deprecated, once the Dafny team publishes their own. From 56443c062188941fc410712ca9358514950555ee Mon Sep 17 00:00:00 2001 From: Andy Jewell Date: Wed, 4 Dec 2024 11:11:20 -0500 Subject: [PATCH 03/11] m --- releases/rust/db_esdk/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/releases/rust/db_esdk/Cargo.toml b/releases/rust/db_esdk/Cargo.toml index 30204e051..feac9c7e5 100644 --- a/releases/rust/db_esdk/Cargo.toml +++ b/releases/rust/db_esdk/Cargo.toml @@ -24,7 +24,7 @@ aws-sdk-kms = "1.50.0" aws-smithy-runtime-api = {version = "1.7.3", features = ["client"] } aws-smithy-types = "1.2.9" chrono = "0.4.38" -dafny_runtime = "0.1.0" +dafny-runtime = "0.1.0" dashmap = "6.1.0" pem = "3.0.4" tokio = {version = "1.41.1", features = ["full"] } From 3ce8edcd49461e291323c0b05f6f6344f1dd6d73 Mon Sep 17 00:00:00 2001 From: Andy Jewell Date: Wed, 4 Dec 2024 11:15:58 -0500 Subject: [PATCH 04/11] m --- releases/rust/db_esdk/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/releases/rust/db_esdk/Cargo.toml b/releases/rust/db_esdk/Cargo.toml index feac9c7e5..7c378ac6c 100644 --- a/releases/rust/db_esdk/Cargo.toml +++ b/releases/rust/db_esdk/Cargo.toml @@ -3,7 +3,7 @@ name = "aws-db-esdk" version = "0.1.0" edition = "2021" rust-version = "1.80.0" -keywords = ["crypto", "cryptography", "security", "dynamodb", "ddb", "encryption", "client-side", "clientside"] +keywords = ["cryptography", "security", "dynamodb", "encryption", "client-side"] license = "ISC AND (Apache-2.0 OR ISC)" description = "aws-db-esdk is a library for implementing client side encryption with DynamoDB." homepage = "https://github.com/aws/aws-database-encryption-sdk-dynamodb/tree/main/releases/rust/db_esdk" From bd92393f546cc731c27e4ca7b2503a96d8c8bb1c Mon Sep 17 00:00:00 2001 From: Andy Jewell Date: Wed, 4 Dec 2024 11:52:09 -0500 Subject: [PATCH 05/11] m --- releases/rust/db_esdk/dafny_runtime_rust/Cargo.toml | 6 +++--- releases/rust/db_esdk/dafny_runtime_rust/README.md | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/releases/rust/db_esdk/dafny_runtime_rust/Cargo.toml b/releases/rust/db_esdk/dafny_runtime_rust/Cargo.toml index b9a97103c..c1b80abad 100644 --- a/releases/rust/db_esdk/dafny_runtime_rust/Cargo.toml +++ b/releases/rust/db_esdk/dafny_runtime_rust/Cargo.toml @@ -1,10 +1,10 @@ [package] -name = "dafny-runtime" -version = "0.1.0" +name = "aws-dafny-runtime" +version = "0.1.1" edition = "2021" keywords = ["dafny"] license = "ISC AND (Apache-2.0 OR ISC)" -description = "dafny-runtime is the runtime support library for Rust code gerated from Dafny." +description = "Accidental thing put in the wrong place" repository = "https://github.com/aws/aws-database-encryption-sdk-dynamodb/tree/main/releases/rust/db_esdk/dafny_runtime_rust" authors = ["AWS-CryptoTools"] readme = "README.md" diff --git a/releases/rust/db_esdk/dafny_runtime_rust/README.md b/releases/rust/db_esdk/dafny_runtime_rust/README.md index e336b5dfe..d18a53555 100644 --- a/releases/rust/db_esdk/dafny_runtime_rust/README.md +++ b/releases/rust/db_esdk/dafny_runtime_rust/README.md @@ -1 +1 @@ -This is the runtime support library for Rust code gerated from Dafny. +Do not use this crate. Use the dafny-runtime crate instead. From 462b7cd535bb3e4215c1f76e0676caed4f9ece2a Mon Sep 17 00:00:00 2001 From: Andy Jewell Date: Wed, 4 Dec 2024 11:54:52 -0500 Subject: [PATCH 06/11] m --- releases/rust/db_esdk/dafny_runtime_rust/Cargo.toml | 4 ++-- releases/rust/db_esdk/dafny_runtime_rust/README.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/releases/rust/db_esdk/dafny_runtime_rust/Cargo.toml b/releases/rust/db_esdk/dafny_runtime_rust/Cargo.toml index c1b80abad..92c31d457 100644 --- a/releases/rust/db_esdk/dafny_runtime_rust/Cargo.toml +++ b/releases/rust/db_esdk/dafny_runtime_rust/Cargo.toml @@ -1,10 +1,10 @@ [package] -name = "aws-dafny-runtime" +name = "dafny-runtime" version = "0.1.1" edition = "2021" keywords = ["dafny"] license = "ISC AND (Apache-2.0 OR ISC)" -description = "Accidental thing put in the wrong place" +description = "dafny-runtime is the runtime support library for Rust code gerated from Dafny." repository = "https://github.com/aws/aws-database-encryption-sdk-dynamodb/tree/main/releases/rust/db_esdk/dafny_runtime_rust" authors = ["AWS-CryptoTools"] readme = "README.md" diff --git a/releases/rust/db_esdk/dafny_runtime_rust/README.md b/releases/rust/db_esdk/dafny_runtime_rust/README.md index d18a53555..f0a4e1a89 100644 --- a/releases/rust/db_esdk/dafny_runtime_rust/README.md +++ b/releases/rust/db_esdk/dafny_runtime_rust/README.md @@ -1 +1 @@ -Do not use this crate. Use the dafny-runtime crate instead. +This is the runtime support library for Rust code generated from Dafny. From b5b959a21f3821ce91ebaeb8a7c282f731ba5577 Mon Sep 17 00:00:00 2001 From: Andy Jewell Date: Wed, 4 Dec 2024 12:05:04 -0500 Subject: [PATCH 07/11] m --- DynamoDbEncryption/runtimes/rust/src/intercept.rs | 2 -- releases/rust/db_esdk/src/intercept.rs | 2 -- 2 files changed, 4 deletions(-) diff --git a/DynamoDbEncryption/runtimes/rust/src/intercept.rs b/DynamoDbEncryption/runtimes/rust/src/intercept.rs index 4ab4738d2..b7d08723a 100644 --- a/DynamoDbEncryption/runtimes/rust/src/intercept.rs +++ b/DynamoDbEncryption/runtimes/rust/src/intercept.rs @@ -16,7 +16,6 @@ use aws_sdk_dynamodb::{ use aws_smithy_runtime_api::client::interceptors::context::Input; use aws_smithy_types::config_bag::{Storable, StoreReplace}; -#[macro_export] macro_rules! modify_request { ($cfg:ident,$request:ident,$self:ident,$transform:ident) => {{ // store the original request @@ -44,7 +43,6 @@ macro_rules! modify_request { }}; } -#[macro_export] macro_rules! modify_response { ($cfg:ident,$type:ty,$response:ident,$self:ident,$transform:ident) => {{ // retrieve the original request diff --git a/releases/rust/db_esdk/src/intercept.rs b/releases/rust/db_esdk/src/intercept.rs index 4ab4738d2..b7d08723a 100644 --- a/releases/rust/db_esdk/src/intercept.rs +++ b/releases/rust/db_esdk/src/intercept.rs @@ -16,7 +16,6 @@ use aws_sdk_dynamodb::{ use aws_smithy_runtime_api::client::interceptors::context::Input; use aws_smithy_types::config_bag::{Storable, StoreReplace}; -#[macro_export] macro_rules! modify_request { ($cfg:ident,$request:ident,$self:ident,$transform:ident) => {{ // store the original request @@ -44,7 +43,6 @@ macro_rules! modify_request { }}; } -#[macro_export] macro_rules! modify_response { ($cfg:ident,$type:ty,$response:ident,$self:ident,$transform:ident) => {{ // retrieve the original request From 80ec20373aaa0035ba4b54abacdd10c4800e8268 Mon Sep 17 00:00:00 2001 From: Andy Jewell Date: Wed, 4 Dec 2024 13:14:47 -0500 Subject: [PATCH 08/11] m --- .github/workflows/library_rust_tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/library_rust_tests.yml b/.github/workflows/library_rust_tests.yml index f193213d2..db415760d 100644 --- a/.github/workflows/library_rust_tests.yml +++ b/.github/workflows/library_rust_tests.yml @@ -55,9 +55,9 @@ jobs: # uses: actions-rust-lang/rustfmt@v1 - name: Setup Dafny - uses: dafny-lang/setup-dafny-action@v1.7.0 + uses: dafny-lang/setup-dafny-action@v1 with: - dafny-version: nightly-latest + dafny-version: dafny-nightly-2024-12-03-4954170 # Remove this after the formatting in Rust starts working - name: smithy-dafny Rust hacks From 57c4ec8a4ac96588c37d703f0dec0e767c3625bb Mon Sep 17 00:00:00 2001 From: Andy Jewell Date: Wed, 4 Dec 2024 13:32:27 -0500 Subject: [PATCH 09/11] m --- .github/workflows/library_rust_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/library_rust_tests.yml b/.github/workflows/library_rust_tests.yml index db415760d..160bc4e22 100644 --- a/.github/workflows/library_rust_tests.yml +++ b/.github/workflows/library_rust_tests.yml @@ -57,7 +57,7 @@ jobs: - name: Setup Dafny uses: dafny-lang/setup-dafny-action@v1 with: - dafny-version: dafny-nightly-2024-12-03-4954170 + dafny-version: nightly-2024-12-03-4954170 # Remove this after the formatting in Rust starts working - name: smithy-dafny Rust hacks From b50d3f481c64ffc81e0a5e0ebbbae25d3518889f Mon Sep 17 00:00:00 2001 From: Andy Jewell Date: Wed, 4 Dec 2024 14:06:55 -0500 Subject: [PATCH 10/11] m --- .github/workflows/library_rust_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/library_rust_tests.yml b/.github/workflows/library_rust_tests.yml index 160bc4e22..10fe5dfcf 100644 --- a/.github/workflows/library_rust_tests.yml +++ b/.github/workflows/library_rust_tests.yml @@ -55,7 +55,7 @@ jobs: # uses: actions-rust-lang/rustfmt@v1 - name: Setup Dafny - uses: dafny-lang/setup-dafny-action@v1 + uses: dafny-lang/setup-dafny-action@v1.7.0 with: dafny-version: nightly-2024-12-03-4954170 From a49a1fe41c13173f9b41a2e17d9d0f14ab009932 Mon Sep 17 00:00:00 2001 From: Andy Jewell Date: Wed, 4 Dec 2024 15:47:45 -0500 Subject: [PATCH 11/11] m --- DynamoDbEncryption/runtimes/rust/Cargo.toml | 4 ++-- releases/rust/db_esdk/Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/DynamoDbEncryption/runtimes/rust/Cargo.toml b/DynamoDbEncryption/runtimes/rust/Cargo.toml index 57bdb1f42..f1da0d79e 100644 --- a/DynamoDbEncryption/runtimes/rust/Cargo.toml +++ b/DynamoDbEncryption/runtimes/rust/Cargo.toml @@ -3,7 +3,7 @@ name = "aws-db-esdk" version = "0.1.0" edition = "2021" rust-version = "1.80.0" -keywords = ["crypto", "cryptography", "security", "dynamodb", "ddb", "encryption", "client-side", "clientside"] +keywords = ["cryptography", "security", "dynamodb", "encryption", "client-side"] license = "ISC AND (Apache-2.0 OR ISC)" description = "aws-db-esdk is a library for implementing client side encryption with DynamoDB." homepage = "https://github.com/aws/aws-database-encryption-sdk-dynamodb/tree/main/releases/rust/db_esdk" @@ -24,7 +24,7 @@ aws-sdk-kms = "1.50.0" aws-smithy-runtime-api = {version = "1.7.3", features = ["client"] } aws-smithy-types = "1.2.9" chrono = "0.4.38" -dafny_runtime = { path = "../../../submodules/MaterialProviders/smithy-dafny/TestModels/dafny-dependencies/dafny_runtime_rust"} +dafny-runtime = "0.1.1" dashmap = "6.1.0" pem = "3.0.4" tokio = {version = "1.41.1", features = ["full"] } diff --git a/releases/rust/db_esdk/Cargo.toml b/releases/rust/db_esdk/Cargo.toml index 7c378ac6c..f1da0d79e 100644 --- a/releases/rust/db_esdk/Cargo.toml +++ b/releases/rust/db_esdk/Cargo.toml @@ -24,7 +24,7 @@ aws-sdk-kms = "1.50.0" aws-smithy-runtime-api = {version = "1.7.3", features = ["client"] } aws-smithy-types = "1.2.9" chrono = "0.4.38" -dafny-runtime = "0.1.0" +dafny-runtime = "0.1.1" dashmap = "6.1.0" pem = "3.0.4" tokio = {version = "1.41.1", features = ["full"] }