Skip to content

Commit aa9175b

Browse files
authored
chore: slight updates to properly publish as a crate (#1480)
* chore: make dafny runtime publishable
1 parent 97dde01 commit aa9175b

File tree

7 files changed

+14
-11
lines changed

7 files changed

+14
-11
lines changed

.github/workflows/library_rust_tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
- name: Setup Dafny
5858
uses: dafny-lang/[email protected]
5959
with:
60-
dafny-version: nightly-latest
60+
dafny-version: nightly-2024-12-03-4954170
6161

6262
# Remove this after the formatting in Rust starts working
6363
- name: smithy-dafny Rust hacks

DynamoDbEncryption/runtimes/rust/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "aws-db-esdk"
33
version = "0.1.0"
44
edition = "2021"
55
rust-version = "1.80.0"
6-
keywords = ["crypto", "cryptography", "security", "dynamodb", "ddb", "encryption", "client-side", "clientside"]
6+
keywords = ["cryptography", "security", "dynamodb", "encryption", "client-side"]
77
license = "ISC AND (Apache-2.0 OR ISC)"
88
description = "aws-db-esdk is a library for implementing client side encryption with DynamoDB."
99
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"
2424
aws-smithy-runtime-api = {version = "1.7.3", features = ["client"] }
2525
aws-smithy-types = "1.2.9"
2626
chrono = "0.4.38"
27-
dafny_runtime = { path = "../../../submodules/MaterialProviders/smithy-dafny/TestModels/dafny-dependencies/dafny_runtime_rust"}
27+
dafny-runtime = "0.1.1"
2828
dashmap = "6.1.0"
2929
pem = "3.0.4"
3030
tokio = {version = "1.41.1", features = ["full"] }

DynamoDbEncryption/runtimes/rust/src/intercept.rs

-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ use aws_sdk_dynamodb::{
1616
use aws_smithy_runtime_api::client::interceptors::context::Input;
1717
use aws_smithy_types::config_bag::{Storable, StoreReplace};
1818

19-
#[macro_export]
2019
macro_rules! modify_request {
2120
($cfg:ident,$request:ident,$self:ident,$transform:ident) => {{
2221
// store the original request
@@ -44,7 +43,6 @@ macro_rules! modify_request {
4443
}};
4544
}
4645

47-
#[macro_export]
4846
macro_rules! modify_response {
4947
($cfg:ident,$type:ty,$response:ident,$self:ident,$transform:ident) => {{
5048
// retrieve the original request

releases/rust/db_esdk/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "aws-db-esdk"
33
version = "0.1.0"
44
edition = "2021"
55
rust-version = "1.80.0"
6-
keywords = ["crypto", "cryptography", "security", "dynamodb", "ddb", "encryption", "client-side", "clientside"]
6+
keywords = ["cryptography", "security", "dynamodb", "encryption", "client-side"]
77
license = "ISC AND (Apache-2.0 OR ISC)"
88
description = "aws-db-esdk is a library for implementing client side encryption with DynamoDB."
99
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"
2424
aws-smithy-runtime-api = {version = "1.7.3", features = ["client"] }
2525
aws-smithy-types = "1.2.9"
2626
chrono = "0.4.38"
27-
dafny_runtime = { path = "./dafny_runtime_rust"}
27+
dafny-runtime = "0.1.1"
2828
dashmap = "6.1.0"
2929
pem = "3.0.4"
3030
tokio = {version = "1.41.1", features = ["full"] }

releases/rust/db_esdk/dafny_runtime_rust/Cargo.toml

+8-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
[package]
2-
name = "dafny_runtime"
3-
version = "0.1.0"
2+
name = "dafny-runtime"
3+
version = "0.1.1"
44
edition = "2021"
5+
keywords = ["dafny"]
6+
license = "ISC AND (Apache-2.0 OR ISC)"
7+
description = "dafny-runtime is the runtime support library for Rust code gerated from Dafny."
8+
repository = "https://github.com/aws/aws-database-encryption-sdk-dynamodb/tree/main/releases/rust/db_esdk/dafny_runtime_rust"
9+
authors = ["AWS-CryptoTools"]
10+
readme = "README.md"
511

612
[dependencies]
713
once_cell = "1.18.0"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This is the runtime support library for Rust code generated from Dafny.

releases/rust/db_esdk/src/intercept.rs

-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ use aws_sdk_dynamodb::{
1616
use aws_smithy_runtime_api::client::interceptors::context::Input;
1717
use aws_smithy_types::config_bag::{Storable, StoreReplace};
1818

19-
#[macro_export]
2019
macro_rules! modify_request {
2120
($cfg:ident,$request:ident,$self:ident,$transform:ident) => {{
2221
// store the original request
@@ -44,7 +43,6 @@ macro_rules! modify_request {
4443
}};
4544
}
4645

47-
#[macro_export]
4846
macro_rules! modify_response {
4947
($cfg:ident,$type:ty,$response:ident,$self:ident,$transform:ident) => {{
5048
// retrieve the original request

0 commit comments

Comments
 (0)