Skip to content

Commit 97dde01

Browse files
authored
chore: add Rust release directory (#1479)
* chore: add Rust release directory
1 parent 98ddfe9 commit 97dde01

File tree

2,109 files changed

+273805
-19
lines changed

Some content is hidden

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

2,109 files changed

+273805
-19
lines changed

.github/workflows/library_rust_tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,4 +114,4 @@ jobs:
114114
working-directory: ./${{ matrix.library }}/runtimes/rust/
115115
shell: bash
116116
run: |
117-
cargo run --example main
117+
cargo run --release --example main

DynamoDbEncryption/runtimes/rust/src/intercept.rs

+1
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(unused)]
78

89
use aws_sdk_dynamodb::{
910
config::{

DynamoDbEncryption/runtimes/rust/src/lib.rs

+18-18
Original file line numberDiff line numberDiff line change
@@ -46,22 +46,22 @@ pub(crate) use crate::implementation_from_dafny::HMAC;
4646
pub(crate) use crate::implementation_from_dafny::UTF8;
4747
pub(crate) use crate::implementation_from_dafny::UUID;
4848

49-
pub mod aes_gcm;
50-
pub mod aes_kdf_ctr;
51-
pub mod concurrent_call;
52-
pub mod dafny_libraries;
53-
pub mod ddb;
54-
pub mod digest;
55-
pub mod ecdh;
56-
pub mod ecdsa;
57-
pub mod hmac;
49+
pub(crate) mod aes_gcm;
50+
pub(crate) mod aes_kdf_ctr;
51+
pub(crate) mod concurrent_call;
52+
pub(crate) mod dafny_libraries;
53+
pub(crate) mod ddb;
54+
pub(crate) mod digest;
55+
pub(crate) mod ecdh;
56+
pub(crate) mod ecdsa;
57+
pub(crate) mod hmac;
5858
pub mod intercept;
59-
pub mod kms;
60-
pub mod local_cmc;
61-
pub mod random;
62-
pub mod rsa;
63-
pub mod sets;
64-
pub mod software_externs;
65-
pub mod storm_tracker;
66-
pub mod time;
67-
pub mod uuid;
59+
pub(crate) mod kms;
60+
pub(crate) mod local_cmc;
61+
pub(crate) mod random;
62+
pub(crate) mod rsa;
63+
pub(crate) mod sets;
64+
pub(crate) mod software_externs;
65+
pub(crate) mod storm_tracker;
66+
pub(crate) mod time;
67+
pub(crate) mod uuid;

releases/rust/db_esdk/.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Cargo.lock
2+
target

releases/rust/db_esdk/.gitignore~

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
*.pem
2+
Cargo.lock
3+
src/aes_gcm.rs
4+
src/aes_kdf_ctr.rs
5+
src/client
6+
src/client.rs
7+
src/concurrent_call.rs
8+
src/conversions
9+
src/conversions.rs
10+
src/dafny_libraries.rs
11+
src/ddb.rs
12+
src/deps
13+
src/deps.rs
14+
src/digest.rs
15+
src/ecdh.rs
16+
src/ecdsa.rs
17+
src/error
18+
src/error.rs
19+
src/hmac.rs
20+
src/implementation_from_dafny.rs
21+
src/kms.rs
22+
src/local_cmc.rs
23+
src/operation
24+
src/operation.rs
25+
src/random.rs
26+
src/rsa.rs
27+
src/sets.rs
28+
src/standard_library_conversions.rs
29+
src/standard_library_externs.rs
30+
src/storm_tracker.rs
31+
src/time.rs
32+
src/types
33+
src/types.rs
34+
src/uuid.rs
35+
target

releases/rust/db_esdk/Cargo.toml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
[package]
2+
name = "aws-db-esdk"
3+
version = "0.1.0"
4+
edition = "2021"
5+
rust-version = "1.80.0"
6+
keywords = ["crypto", "cryptography", "security", "dynamodb", "ddb", "encryption", "client-side", "clientside"]
7+
license = "ISC AND (Apache-2.0 OR ISC)"
8+
description = "aws-db-esdk is a library for implementing client side encryption with DynamoDB."
9+
homepage = "https://github.com/aws/aws-database-encryption-sdk-dynamodb/tree/main/releases/rust/db_esdk"
10+
repository = "https://github.com/aws/aws-database-encryption-sdk-dynamodb/tree/main/releases/rust/db_esdk"
11+
authors = ["AWS-CryptoTools"]
12+
documentation = "https://docs.rs/crate/aws-db-esdk"
13+
autoexamples = false
14+
readme = "README.md"
15+
16+
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
17+
18+
[dependencies]
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"
26+
chrono = "0.4.38"
27+
dafny_runtime = { path = "./dafny_runtime_rust"}
28+
dashmap = "6.1.0"
29+
pem = "3.0.4"
30+
tokio = {version = "1.41.1", features = ["full"] }
31+
uuid = { version = "1.11.0", features = ["v4"] }
32+
33+
[[example]]
34+
name = "main"

releases/rust/db_esdk/README.md

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# AWS Database Encryption SDK for DynamoDB
2+
3+
AWS Database Encryption SDK for DynamoDB
4+
5+
## Using the AWS Database Encryption SDK for DynamoDB for Rust
6+
7+
The AWS Database Encryption SDK for DynamoDB is available on [Crates.io](https://www.crates.io/).
8+
9+
## Building the AWS Database Encryption SDK for DynamoDB
10+
11+
To build, the AWS Database Encryption SDK for DynamoDB requires the most up to date version of [Dafny](https://github.com/dafny-lang/dafny) on your PATH.
12+
13+
You will also need to ensure that you fetch all submodules using either `git clone --recursive ...` when cloning the repository or `git submodule update --init` on an existing clone.
14+
15+
To setup your project to use the AWS Database Encryption SDK for DynamoDB in Rust, run:
16+
17+
```
18+
cd DynamoDbEncryption
19+
# Polymorph smithy to Rust
20+
make polymorph_rust
21+
# Transpile Dafny to Rust
22+
make transpile_rust
23+
# Build Project
24+
cd runtimes/rust
25+
cargo build
26+
```
27+
28+
### (Optional) Set up the AWS Database Encryption SDK for DynamoDB to work with AWS KMS
29+
30+
If you set up the AWS Database Encryption SDK for DynamoDB to use the AWS KMS Keyring,
31+
the AWS Database Encryption SDK for DynamoDB will make calls to AWS KMS on your behalf,
32+
using the appropriate AWS SDK.
33+
34+
However, you must first set up AWS credentials for use with the AWS SDK.
35+
36+
## Testing the AWS Database Encryption SDK for DynamoDB for Rust
37+
38+
### Configure AWS credentials
39+
40+
To run the test suite you must first set up AWS credentials for use with the AWS SDK.
41+
This is required in order to run the integration tests, which use a KMS Keyring against a publicly accessible KMS CMK.
42+
43+
### Run the tests
44+
45+
Run the test suite with:
46+
47+
```
48+
cd AwsEncryptionSDK
49+
make test_rust
50+
```
51+
52+
Run tests on examples, to ensure they are up to date:
53+
54+
```
55+
cd AwsEncryptionSDK/runtimes/rust/
56+
cargo test --examples
57+
```
58+
59+
Please look at the Examples on how to use the Encryption SDK in Rust [here](examples).
60+
61+
Please note that tests and test vectors require internet access and valid AWS credentials, since calls to KMS are made as part of the test workflow.
62+
63+
## License
64+
65+
This library is licensed under the Apache 2.0 License.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
target/
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[package]
2+
name = "dafny_runtime"
3+
version = "0.1.0"
4+
edition = "2021"
5+
6+
[dependencies]
7+
once_cell = "1.18.0"
8+
num = "0.4"
9+
itertools = "0.11.0"

0 commit comments

Comments
 (0)