Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AwsEncryptionSDK/runtimes/rust/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "aws-esdk"
version = "1.2.1"
version = "1.2.2"
edition = "2021"
keywords = ["cryptography", "security", "dynamodb", "encryption", "client-side"]
license = "ISC AND (Apache-2.0 OR ISC)"
Expand Down
2 changes: 1 addition & 1 deletion mpl
Submodule mpl updated from 3ea116 to 03c999
23 changes: 11 additions & 12 deletions releases/rust/esdk/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
[package]
name = "aws-esdk"
version = "1.2.1"
version = "1.2.2"
edition = "2021"
rust-version = "1.88.0"
keywords = ["cryptography", "security", "dynamodb", "encryption", "client-side"]
license = "ISC AND (Apache-2.0 OR ISC)"
description = "aws-esdk is a library for implementing client side encryption."
Expand All @@ -16,21 +15,21 @@ readme = "README.md"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
aws-config = "1.8.10"
aws-lc-rs = {version = "1.15.0"}
aws-lc-sys = { version = "0.33", optional = true }
aws-config = "1.8.12"
aws-lc-rs = {version = "1.15.4"}
aws-lc-sys = { version = "0.37", optional = true }
aws-lc-fips-sys = { version = "0.13", optional = true }
aws-sdk-dynamodb = "1.98.0"
aws-sdk-kms = "1.94.0"
aws-smithy-runtime-api = {version = "1.9.2", features = ["client"] }
aws-smithy-types = "1.3.4"
chrono = "0.4.42"
aws-sdk-dynamodb = "1.103.0"
aws-sdk-kms = "1.98.0"
aws-smithy-runtime-api = {version = "1.10.0", features = ["client"] }
aws-smithy-types = "1.3.6"
chrono = "0.4.43"
cpu-time = "1.0.0"
dashmap = "6.1.0"
pem = "3.0.6"
rand = "0.9.2"
tokio = {version = "1.48.0", features = ["full"] }
uuid = { version = "1.18.1", features = ["v4"] }
tokio = {version = "1.49.0", features = ["full"] }
uuid = { version = "1.19.0", features = ["v4"] }
dafny-runtime = { version = "0.3.1", features = ["sync", "small-int"] }

[[example]]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ pub async fn encrypt_and_decrypt_with_keyring(
Ok(())
}

#[tokio::test(flavor = "multi_thread")]
#[tokio::test]
pub async fn test_encrypt_and_decrypt_with_keyring() -> Result<(), crate::BoxError2> {
// Test function for encrypt and decrypt using the AWS KMS Keyring example
use crate::example_utils::utils;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ pub async fn encrypt_and_decrypt_with_keyring(
Ok(())
}

#[tokio::test(flavor = "multi_thread")]
#[tokio::test]
pub async fn test_encrypt_and_decrypt_with_keyring() -> Result<(), crate::BoxError2> {
// Test function for encrypt and decrypt using the AWS KMS MRK Multi Keyring example
use crate::example_utils::utils;
Expand Down
39 changes: 9 additions & 30 deletions releases/rust/esdk/src/ddb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,8 @@
#![deny(nonstandard_style)]
#![deny(clippy::all)]

use crate::escape::escape_to_async;
use aws_config::Region;
use std::sync::LazyLock;

static DAFNY_TOKIO_RUNTIME: LazyLock<tokio::runtime::Runtime> = LazyLock::new(|| {
tokio::runtime::Builder::new_multi_thread()
.enable_all()
.build()
.unwrap()
});

#[allow(non_snake_case)]
impl crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::_default {
Expand All @@ -27,22 +20,15 @@ impl crate::r#software::amazon::cryptography::services::dynamodb::internaldafny:
dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(
region,
);
let shared_config = match tokio::runtime::Handle::try_current() {
Ok(curr) => tokio::task::block_in_place(|| {
curr.block_on(async {
aws_config::load_defaults(aws_config::BehaviorVersion::latest()).await
})
}),
Err(_) => DAFNY_TOKIO_RUNTIME.block_on(aws_config::load_defaults(
aws_config::BehaviorVersion::latest(),
)),
};
let shared_config = escape_to_async(aws_config::load_defaults(
aws_config::BehaviorVersion::latest(),
));
let shared_config = shared_config
.to_builder()
.region(Region::new(region))
.build();
let inner = aws_sdk_dynamodb::Client::new(&shared_config);
let client = crate::deps::com_amazonaws_dynamodb::client::Client { inner };
let client = crate::DdbClient { inner };
let dafny_client = ::dafny_runtime::upcast_object()(::dafny_runtime::object::new(client));
dafny_runtime::Rc::new(crate::r#_Wrappers_Compile::Result::Success {
value: dafny_client,
Expand All @@ -55,18 +41,11 @@ impl crate::r#software::amazon::cryptography::services::dynamodb::internaldafny:
::dafny_runtime::Rc<crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Error>
>
>{
let shared_config = match tokio::runtime::Handle::try_current() {
Ok(curr) => tokio::task::block_in_place(|| {
curr.block_on(async {
aws_config::load_defaults(aws_config::BehaviorVersion::latest()).await
})
}),
Err(_) => DAFNY_TOKIO_RUNTIME.block_on(aws_config::load_defaults(
aws_config::BehaviorVersion::latest(),
)),
};
let shared_config = escape_to_async(aws_config::load_defaults(
aws_config::BehaviorVersion::latest(),
));
let inner = aws_sdk_dynamodb::Client::new(&shared_config);
let client = crate::deps::com_amazonaws_dynamodb::client::Client { inner };
let client = crate::DdbClient { inner };
let dafny_client = ::dafny_runtime::upcast_object()(::dafny_runtime::object::new(client));
dafny_runtime::Rc::new(crate::r#_Wrappers_Compile::Result::Success {
value: dafny_client,
Expand Down
Loading
Loading