Skip to content

Commit 659e5cc

Browse files
committed
m
1 parent 8042fd3 commit 659e5cc

File tree

68 files changed

+4852
-884
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+4852
-884
lines changed

releases/rust/db_esdk/Cargo.toml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,18 @@ readme = "README.md"
1616
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
1717

1818
[dependencies]
19-
aws-config = "1.5.8"
20-
aws-lc-rs = "1.10.0"
21-
aws-lc-sys = "0.22.0"
22-
aws-sdk-dynamodb = "1.50.0"
23-
aws-sdk-kms = "1.47.0"
24-
aws-smithy-runtime-api = {version = "1.7.2", features = ["client"] }
25-
aws-smithy-types = "1.2.8"
19+
aws-config = "1.5.10"
20+
aws-lc-rs = "1.11.1"
21+
aws-lc-sys = "0.23.1"
22+
aws-sdk-dynamodb = "1.54.0"
23+
aws-sdk-kms = "1.50.0"
24+
aws-smithy-runtime-api = {version = "1.7.3", features = ["client"] }
25+
aws-smithy-types = "1.2.9"
2626
chrono = "0.4.38"
27-
dafny_runtime = { path = "dafny_runtime_rust"}
27+
dafny_runtime = { "./dafny_runtime_rust"}
2828
dashmap = "6.1.0"
2929
pem = "3.0.4"
30-
tokio = {version = "1.41.0", features = ["full"] }
30+
tokio = {version = "1.41.1", features = ["full"] }
3131
uuid = { version = "1.11.0", features = ["v4"] }
3232

3333
[[example]]

releases/rust/db_esdk/dafny_runtime_rust/Makefile

Lines changed: 0 additions & 22 deletions
This file was deleted.

releases/rust/db_esdk/dafny_runtime_rust/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ pub mod dafny_runtime_conversions {
200200
DafnyMap::<K, V>::from_hashmap(map, converter_k, converter_v)
201201
}
202202

203-
// --unicode-chars:true
203+
// --unicode-char:true
204204
pub mod unicode_chars_true {
205205
use crate::Sequence;
206206

@@ -216,7 +216,7 @@ pub mod dafny_runtime_conversions {
216216
}
217217
}
218218

219-
// --unicode-chars:false
219+
// --unicode-char:false
220220
pub mod unicode_chars_false {
221221
use crate::Sequence;
222222

releases/rust/db_esdk/src/aes_gcm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ impl AES_GCM {
5656
Ok(&aws_lc_rs::aead::AES_128_GCM)
5757
} else {
5858
Err(format!(
59-
"Key length of {} not supported in Rust. Tag length must be 16 or 32.",
59+
"Key length of {} not supported in Rust. Key length must be 16 or 32.",
6060
self.keyLength()
6161
))
6262
}

releases/rust/db_esdk/src/aes_kdf_ctr.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#![deny(warnings, unconditional_panic)]
55
#![deny(nonstandard_style)]
66
#![deny(clippy::all)]
7+
#![allow(dead_code)]
78

89
#[allow(non_snake_case)]
910
pub mod AesKdfCtr {

releases/rust/db_esdk/src/dafny_libraries.rs

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,12 @@ pub mod DafnyLibraries {
7171
}
7272
}
7373

74+
impl<K: ::dafny_runtime::DafnyTypeEq, V: ::dafny_runtime::DafnyTypeEq>
75+
::dafny_runtime::UpcastObject<dyn ::std::any::Any> for MutableMap<K, V>
76+
{
77+
::dafny_runtime::UpcastObjectFn!(dyn ::std::any::Any);
78+
}
79+
7480
pub mod FileIO {
7581
use std::fs::File;
7682
use std::io::Read;
@@ -89,7 +95,12 @@ pub mod DafnyLibraries {
8995

9096
let mut file = match File::open(path) {
9197
Err(why) => {
92-
let err_msg = format!("couldn't open {} for reading from {}: {}", path.display(), curr_dir(), why);
98+
let err_msg = format!(
99+
"couldn't open {} for reading from {}: {}",
100+
path.display(),
101+
curr_dir(),
102+
why
103+
);
93104
let err_msg = dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&err_msg);
94105
return (true, dafny_runtime::Sequence::default(), err_msg);
95106
}
@@ -111,8 +122,7 @@ pub mod DafnyLibraries {
111122
}
112123
}
113124

114-
fn curr_dir() -> String
115-
{
125+
fn curr_dir() -> String {
116126
let path = std::env::current_dir();
117127
match path {
118128
Ok(path) => format!("{}", path.display()),
@@ -137,7 +147,12 @@ pub mod DafnyLibraries {
137147
.open(path);
138148
let mut file = match maybe_file {
139149
Err(why) => {
140-
let err_msg = format!("couldn't open {} for writing from {}: {}", path.display(), curr_dir(), why);
150+
let err_msg = format!(
151+
"couldn't open {} for writing from {}: {}",
152+
path.display(),
153+
curr_dir(),
154+
why
155+
);
141156
let err_msg = dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&err_msg);
142157
return (true, err_msg);
143158
}

releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,8 @@ pub mod aes_wrapping_alg;
233233

234234
pub mod symmetric_signature_algorithm;
235235

236+
pub mod time_units;
237+
236238
pub mod update_usage_metadata;
237239

238240
pub mod update_usage_metadata_input;

releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/error.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ crate::deps::aws_cryptography_materialProviders::types::error::Error::EntryDoesN
4747
crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::Error::EntryDoesNotExist {
4848
message: ::dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&message),
4949
},
50+
crate::deps::aws_cryptography_materialProviders::types::error::Error::InFlightTtlExceeded { message } =>
51+
crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::Error::InFlightTTLExceeded {
52+
message: ::dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&message),
53+
},
5054
crate::deps::aws_cryptography_materialProviders::types::error::Error::InvalidAlgorithmSuiteInfo { message } =>
5155
crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::Error::InvalidAlgorithmSuiteInfo {
5256
message: ::dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&message),
@@ -137,6 +141,10 @@ crate::r#software::amazon::cryptography::materialproviders::internaldafny::types
137141
crate::deps::aws_cryptography_materialProviders::types::error::Error::EntryDoesNotExist {
138142
message: ::dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(&message),
139143
},
144+
crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::Error::InFlightTTLExceeded { message } =>
145+
crate::deps::aws_cryptography_materialProviders::types::error::Error::InFlightTtlExceeded {
146+
message: ::dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(&message),
147+
},
140148
crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::Error::InvalidAlgorithmSuiteInfo { message } =>
141149
crate::deps::aws_cryptography_materialProviders::types::error::Error::InvalidAlgorithmSuiteInfo {
142150
message: ::dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(&message),

releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/storm_tracking_cache.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ pub fn to_dafny_plain(
2222
fanOut: value.fan_out.clone().unwrap(),
2323
inFlightTTL: value.in_flight_ttl.clone().unwrap(),
2424
sleepMilli: value.sleep_milli.clone().unwrap(),
25+
timeUnits: ::std::rc::Rc::new(match &value.time_units {
26+
Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::aws_cryptography_materialProviders::conversions::time_units::to_dafny(x.clone()) },
27+
None => crate::_Wrappers_Compile::Option::None { }
28+
})
29+
,
2530
}
2631
}
2732

@@ -62,6 +67,13 @@ pub fn plain_from_dafny(
6267
.set_fan_out(Some( dafny_value.fanOut() .clone() ))
6368
.set_in_flight_ttl(Some( dafny_value.inFlightTTL() .clone() ))
6469
.set_sleep_milli(Some( dafny_value.sleepMilli() .clone() ))
70+
.set_time_units(match &**dafny_value.timeUnits() {
71+
crate::r#_Wrappers_Compile::Option::Some { value } => Some(
72+
crate::deps::aws_cryptography_materialProviders::conversions::time_units::from_dafny(value)
73+
),
74+
_ => None,
75+
}
76+
)
6577
.build()
6678
.unwrap()
6779
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
2+
// SPDX-License-Identifier: Apache-2.0
3+
// Do not modify this file. This file is machine generated, and any changes to it will be overwritten.
4+
#[allow(dead_code)]
5+
6+
pub fn to_dafny(
7+
value: crate::deps::aws_cryptography_materialProviders::types::TimeUnits,
8+
) -> ::std::rc::Rc<crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::TimeUnits>{
9+
::std::rc::Rc::new(match value {
10+
crate::deps::aws_cryptography_materialProviders::types::TimeUnits::Seconds => crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::TimeUnits::Seconds {},
11+
crate::deps::aws_cryptography_materialProviders::types::TimeUnits::Milliseconds => crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::TimeUnits::Milliseconds {},
12+
_ => panic!("Unknown enum variant: {}", value),
13+
})
14+
}
15+
#[allow(dead_code)]
16+
pub fn from_dafny(
17+
dafny_value: &crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::TimeUnits,
18+
) -> crate::deps::aws_cryptography_materialProviders::types::TimeUnits {
19+
match dafny_value {
20+
crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::TimeUnits::Seconds {} => crate::deps::aws_cryptography_materialProviders::types::TimeUnits::Seconds,
21+
crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::TimeUnits::Milliseconds {} => crate::deps::aws_cryptography_materialProviders::types::TimeUnits::Milliseconds,
22+
}
23+
}

0 commit comments

Comments
 (0)