Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Support multiple models/dependencies in Rust, within a single crate #583

Merged
merged 111 commits into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
111 commits
Select commit Hold shift + click to select a range
369f87c
chore: prepare for sdk in Rust
ajewellamz Sep 11, 2024
da5adc6
Enable tests
robin-aws Sep 11, 2024
67501e3
Trying just applying library support for Unions as is
robin-aws Sep 11, 2024
cd3cfb8
Enable Dependencies test model
robin-aws Sep 12, 2024
9b0b7d0
Annoying space
robin-aws Sep 12, 2024
fd8d28c
Progress!
robin-aws Sep 13, 2024
774ca2d
Close!
robin-aws Sep 13, 2024
ad48f71
More filtering
robin-aws Sep 13, 2024
f00781b
Generate for bound operations
robin-aws Sep 13, 2024
47c38cf
Qualify more conversions modules/types correctly
robin-aws Sep 13, 2024
2bf7e89
Dependency error variants
robin-aws Sep 13, 2024
af945ad
Generating all necessary modules at least
robin-aws Sep 13, 2024
9957107
Merge branch 'main-1.x' of github.com:smithy-lang/smithy-dafny into r…
robin-aws Sep 13, 2024
414e09e
Template fixes
robin-aws Sep 13, 2024
6306303
Fixed operation conversions
robin-aws Sep 13, 2024
55ecafd
Fixed error conversions
robin-aws Sep 13, 2024
ea6ad97
Missing externs on multiple model (temporary)
robin-aws Sep 13, 2024
b0ca472
Transpile tests
robin-aws Sep 13, 2024
d21d70a
Need wrapped clients for deps after all
robin-aws Sep 13, 2024
aff6649
single targets for rust
robin-aws Sep 13, 2024
a76b3d0
Fixed wrapped client
robin-aws Sep 14, 2024
5bb533c
Fix other test models
robin-aws Sep 14, 2024
dfd1f1e
Typos
robin-aws Sep 14, 2024
fbebcad
Formatting
robin-aws Sep 14, 2024
c6fded0
Allow multiple —namespace options
robin-aws Sep 14, 2024
31659b4
Missing Cargo.toml
robin-aws Sep 14, 2024
7e1bd0e
Addressed comment
robin-aws Sep 14, 2024
93b55e9
Add MAIN_SERVICE_FOR_RUST
robin-aws Sep 14, 2024
2787800
Missing files
robin-aws Sep 15, 2024
a15552a
Mostly refactor to prepare for new approach
robin-aws Sep 15, 2024
d582bd2
got it to build again
robin-aws Sep 15, 2024
039a1ab
Work around makefile
robin-aws Sep 15, 2024
40ed377
Get MultipleModels working again
robin-aws Sep 15, 2024
d8813bc
Fix SDK fix
robin-aws Sep 15, 2024
543caf5
Fix sdk cases of crate::
robin-aws Sep 15, 2024
d453f30
Qualified all SDK files
robin-aws Sep 15, 2024
60c9a46
Check in MultipleModels for now
robin-aws Sep 15, 2024
fdc359e
Make no main service case work
robin-aws Sep 15, 2024
9acc14e
Get ddb-lite working
robin-aws Sep 15, 2024
11eaeb0
Update KMS model
robin-aws Sep 15, 2024
fde02f4
Bugfixes
robin-aws Sep 15, 2024
ec0ae86
Merge branch 'main-1.x' of github.com:smithy-lang/smithy-dafny into r…
robin-aws Sep 15, 2024
ac9edf3
Fix bad merge
robin-aws Sep 15, 2024
2af5fcb
kms works (aside from RegionMatch)
robin-aws Sep 15, 2024
ca3fcfc
update Java and .NET KMS versions
robin-aws Sep 15, 2024
cfeff0f
More fixes
robin-aws Sep 15, 2024
3dc0b11
Revert bad change
robin-aws Sep 15, 2024
e705328
Restore lost standardization
robin-aws Sep 15, 2024
faf960e
Fix dep top level module for sdk
robin-aws Sep 15, 2024
c6a13a0
Missing naming case on enums
robin-aws Sep 15, 2024
3acb9d9
Merge branch 'robin-aws/enable-full-sdk-test-models-in-rust' of githu…
robin-aws Sep 15, 2024
52d6bfd
Naming fix
robin-aws Sep 15, 2024
b5bf5eb
Merge branch 'robin-aws/enable-full-sdk-test-models-in-rust' of githu…
robin-aws Sep 15, 2024
8e55602
Get attribute_value.rs back
robin-aws Sep 15, 2024
eeedc0b
Lots of path fixes
robin-aws Sep 16, 2024
2504112
Progress on MPL
robin-aws Sep 16, 2024
b4e318d
Fix resource conversion + misc
robin-aws Sep 16, 2024
463a0af
Fix resource conversion to account for positional and unit
robin-aws Sep 16, 2024
19bc4d1
Don’t generate conversion modules for positional structrues
robin-aws Sep 16, 2024
de7c8a7
Still skip input and output structures for now (need better solution)
robin-aws Sep 16, 2024
bea8861
Partial solution
robin-aws Sep 16, 2024
12bc02d
Type(os)
robin-aws Sep 16, 2024
f566794
sdkid fixes
robin-aws Sep 16, 2024
4d22259
Borrowing consistency in conversions
robin-aws Sep 16, 2024
8180776
Explicit closure argument types
robin-aws Sep 16, 2024
8f288a0
Missing case for long
robin-aws Sep 16, 2024
b4d2829
@readonly -> &self instead of &mut self
robin-aws Sep 16, 2024
5c596f8
Fix None -> _None (partial)
robin-aws Sep 16, 2024
94c7bf1
More Unit input handling
robin-aws Sep 16, 2024
d64352d
Fix dafny type
robin-aws Sep 17, 2024
c90f421
More fixes
robin-aws Sep 17, 2024
9b86b52
Missing file
robin-aws Sep 17, 2024
2ec8cc4
Disable client constructor by default
robin-aws Sep 17, 2024
443571e
Top level error type for sdks
robin-aws Sep 17, 2024
5dad1be
Naming fix
robin-aws Sep 17, 2024
bfdc2a5
Only generate the wrapped client on —local-service-test
robin-aws Sep 17, 2024
1e65e51
Fix sdk client conversion (unsafe notwithstanding)
robin-aws Sep 17, 2024
1785a3f
Codegen for all errors (as Dafny does too)
robin-aws Sep 17, 2024
5856855
Missing option
robin-aws Sep 17, 2024
f90b85b
Fix top level declarations for sdks
robin-aws Sep 17, 2024
a45277d
Missing top level module declarations
robin-aws Sep 18, 2024
43923dd
Partial fix to input/output structure naming
robin-aws Sep 18, 2024
c02e2cb
More naming fixes
robin-aws Sep 18, 2024
2d79373
More naming fixes
robin-aws Sep 18, 2024
fdd8c9a
Restore sdk error conversion function
robin-aws Sep 18, 2024
75ecb60
*squish*
robin-aws Sep 19, 2024
da16064
Hardcoding unwrap()s for now
robin-aws Sep 19, 2024
decc6b4
Missing block_in_place calls
robin-aws Sep 19, 2024
4c16615
Add Into<Client> for SDK wrapping clients
robin-aws Sep 19, 2024
557491d
Makefile update
robin-aws Sep 20, 2024
70094e0
remove todo
robin-aws Sep 20, 2024
cb609e7
Use Error instead of BuildError on Client::from_conf
robin-aws Sep 21, 2024
acc6bfa
Merge branch 'main-1.x' of github.com:smithy-lang/smithy-dafny into r…
robin-aws Sep 26, 2024
bbb67ea
specify edition in rustfmt
ajewellamz Sep 27, 2024
b8013e1
Merge branch 'main-1.x' of github.com:smithy-lang/smithy-dafny into r…
robin-aws Oct 3, 2024
1be466d
Merge branch 'main-1.x' into robin-aws/support-dependencies-on-rust
robin-aws Oct 7, 2024
4abccec
Revert KMS changes
robin-aws Oct 7, 2024
a70f30c
Merge branch 'robin-aws/support-dependencies-on-rust' of github.com:s…
robin-aws Oct 7, 2024
850d211
makefile fixes
robin-aws Oct 8, 2024
71a9289
Fix kms
robin-aws Oct 8, 2024
cebe52b
Merge branch 'main-1.x' into robin-aws/support-dependencies-on-rust
robin-aws Oct 9, 2024
1f7e71f
Disable updating the Rust runtime in CI for now
robin-aws Oct 9, 2024
ead1517
Regenerate MultipleModels
robin-aws Oct 9, 2024
cf35cbe
Regenerate more models
robin-aws Oct 9, 2024
4b199ad
Deleting generated content instead
robin-aws Oct 9, 2024
4c14301
Remove MultipleModels generated files
robin-aws Oct 10, 2024
ccc0935
Fix test imports
robin-aws Oct 10, 2024
f030151
Fix StandardLibrary
robin-aws Oct 10, 2024
0e06038
Formatting, actually fix StandardLibrary
robin-aws Oct 10, 2024
59218fb
Fix makefile
robin-aws Oct 10, 2024
9b45d63
Merge branch 'main-1.x' into robin-aws/support-dependencies-on-rust
robin-aws Oct 10, 2024
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
14 changes: 9 additions & 5 deletions .github/actions/build_dafny_from_source/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,12 @@ runs:
# update the copy of the Rust runtime we have inside TestModels
# (since it's not published yet)
- name: Update dafny_runtime_rust
shell: bash
run: |
rm -rf TestModels/dafny-dependencies/dafny_runtime_rust
cp -r dafny/Source/DafnyRuntime/DafnyRuntimeRust TestModels/dafny-dependencies/dafny_runtime_rust
# TODO: Temporarily not doing this because we need a targeted fix to the runtime,
# but can't pick it up by moving to a newer Dafny commit because that would pull in
# other breaking changes.

# - name: Update dafny_runtime_rust
# shell: bash
# run: |
# rm -rf TestModels/dafny-dependencies/dafny_runtime_rust
# cp -r dafny/Source/DafnyRuntime/DafnyRuntimeRust TestModels/dafny-dependencies/dafny_runtime_rust
58 changes: 34 additions & 24 deletions SmithyDafnyMakefile.mk
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ _polymorph:
--dependent-model $(PROJECT_ROOT)/$(SMITHY_DEPS) \
$(patsubst %, --dependent-model $(PROJECT_ROOT)/%/Model, $($(service_deps_var))) \
$(DEPENDENCY_MODULE_NAMES) \
--namespace $($(namespace_var)) \
$(patsubst %, --namespace %, $($(namespace_var))) \
$(OUTPUT_LOCAL_SERVICE_$(SERVICE)) \
$(AWS_SDK_CMD) \
$(POLYMORPH_OPTIONS) \
Expand Down Expand Up @@ -428,20 +428,15 @@ setup_prettier:
npm i --no-save prettier@3 prettier-plugin-java@2.5

# Generates rust code for all namespaces in this project
# Note that we rely on the patching feature of polymorph
# to also patch the results of transpile_rust,
# so we assume that is run first!
.PHONY: polymorph_rust
polymorph_rust: POLYMORPH_LANGUAGE_TARGET=rust
polymorph_rust: _polymorph_dependencies

polymorph_rust:
set -e; for service in $(PROJECT_SERVICES) ; do \
export service_deps_var=SERVICE_DEPS_$${service} ; \
export namespace_var=SERVICE_NAMESPACE_$${service} ; \
export SERVICE=$${service} ; \
$(MAKE) _polymorph_rust ; \
done
$(MAKE) _polymorph_rust

_polymorph_rust: POLYMORPH_LANGUAGE_TARGET=rust
_polymorph_rust: service_deps_var=SERVICE_DEPS_$(MAIN_SERVICE_FOR_RUST)
_polymorph_rust: namespace_var=SERVICE_NAMESPACE_$(MAIN_SERVICE_FOR_RUST)
_polymorph_rust: SERVICE=$(MAIN_SERVICE_FOR_RUST)
_polymorph_rust: OUTPUT_RUST=--output-rust $(LIBRARY_ROOT)/runtimes/rust
# For several TestModels we've just manually written the code generation target,
# So we just want to ensure we can transpile and pass the tests in CI.
Expand Down Expand Up @@ -562,7 +557,7 @@ rust: polymorph_dafny transpile_rust polymorph_rust test_rust

# The Dafny Rust code generator only supports a single crate for everything,
# so (among other consequences) we compile src and test code together.
transpile_rust: | transpile_implementation_rust transpile_dependencies_rust
transpile_rust: | transpile_implementation_rust

transpile_implementation_rust: TARGET=rs
transpile_implementation_rust: OUT=implementation_from_dafny
Expand All @@ -589,17 +584,15 @@ _mv_implementation_rust:
# rustfmt has a recurring bug where it leaves behind trailing spaces and then complains about it.
# Pre-process the Dafny-generated Rust code to remove them.
sed -i -e 's/[[:space:]]*$$//' runtimes/rust/src/implementation_from_dafny.rs

rm -f runtimes/rust/src/implementation_from_dafny.rs-e
rustfmt --edition 2021 runtimes/rust/src/implementation_from_dafny.rs
rm -rf implementation_from_dafny-rust

patch_after_transpile_rust:
set -e; for service in $(PROJECT_SERVICES) ; do \
export service_deps_var=SERVICE_DEPS_$${service} ; \
export namespace_var=SERVICE_NAMESPACE_$${service} ; \
export SERVICE=$${service} ; \
$(MAKE) _patch_after_transpile_rust ; \
done
export service_deps_var=SERVICE_DEPS_$(MAIN_SERVICE_FOR_RUST) ; \
export namespace_var=SERVICE_NAMESPACE_$(MAIN_SERVICE_FOR_RUST) ; \
export SERVICE=$(MAIN_SERVICE_FOR_RUST) ; \
$(MAKE) _patch_after_transpile_rust ; \

_patch_after_transpile_rust: OUTPUT_RUST=--output-rust $(LIBRARY_ROOT)/runtimes/rust
_patch_after_transpile_rust:
Expand All @@ -615,6 +608,7 @@ _patch_after_transpile_rust:
--namespace $($(namespace_var)) \
$(AWS_SDK_CMD) \
$(POLYMORPH_OPTIONS) \
$(if $(TRANSPILE_TESTS_IN_RUST), --local-service-test, ) \
";

build_rust:
Expand Down Expand Up @@ -726,12 +720,28 @@ local_transpile_impl_net_single: TARGET=cs
local_transpile_impl_net_single: OUT=runtimes/net/ImplementationFromDafny
local_transpile_impl_net_single: local_transpile_impl_single

local_transpile_impl_rust_single: TARGET=rs
local_transpile_impl_rust_single: OUT=implementation_from_dafny
local_transpile_impl_rust_single: SRC_INDEX=$(RUST_SRC_INDEX)
local_transpile_impl_rust_single: TEST_INDEX=$(RUST_TEST_INDEX)
local_transpile_impl_rust_single: DAFNY_OPTIONS=--emit-uncompilable-code --allow-warnings --compile-suffix
local_transpile_impl_rust_single: TRANSPILE_DEPENDENCIES=
local_transpile_impl_rust_single: STD_LIBRARY=
local_transpile_impl_rust_single: SRC_INDEX_TRANSPILE=$(if $(SRC_INDEX),$(SRC_INDEX),src)
local_transpile_impl_rust_single: TEST_INDEX_TRANSPILE=$(if $(TEST_INDEX),$(TEST_INDEX),test)
local_transpile_impl_rust_single: DAFNY_OTHER_FILES=$(RUST_OTHER_FILES)
local_transpile_impl_rust_single: deps_var=SERVICE_DEPS_$(SERVICE)
local_transpile_impl_rust_single: service_deps_var=SERVICE_DEPS_$(SERVICE)
local_transpile_impl_rust_single: namespace_var=SERVICE_NAMESPACE_$(SERVICE)
local_transpile_impl_rust_single: $(if $(TRANSPILE_TESTS_IN_RUST), transpile_test, transpile_implementation) _mv_implementation_rust _patch_after_transpile_rust


local_transpile_impl_single: deps_var=SERVICE_DEPS_$(SERVICE)
local_transpile_impl_single: TRANSPILE_TARGETS=./dafny/$(SERVICE)/src/$(FILE)
local_transpile_impl_single: TRANSPILE_DEPENDENCIES= \
$(patsubst %, -library:$(PROJECT_ROOT)/%/src/Index.dfy, $($(deps_var))) \
$(patsubst %, -library:$(PROJECT_ROOT)/%, $(PROJECT_INDEX)) \
-library:$(PROJECT_ROOT)/$(STD_LIBRARY)/src/Index.dfy
$(patsubst %, --library:$(PROJECT_ROOT)/%/src/Index.dfy, $($(deps_var))) \
$(patsubst %, --library:$(PROJECT_ROOT)/%, $(PROJECT_INDEX)) \
--library:$(PROJECT_ROOT)/$(STD_LIBRARY)/src/Index.dfy
local_transpile_impl_single: transpile_implementation

# Targets to transpile single local service for convenience.
Expand Down Expand Up @@ -766,4 +776,4 @@ local_polymorph_rust_single: local_polymorph_single
local_polymorph_single: service_deps_var=SERVICE_DEPS_$(SERVICE)
local_polymorph_single: namespace_var=SERVICE_NAMESPACE_$(SERVICE)
local_polymorph_single: PROJECT_DEPENDENCIES=
local_polymorph_single: _polymorph
local_polymorph_single: _polymorph
2 changes: 2 additions & 0 deletions TestModels/Aggregate/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ include ../SharedMakefile.mk
PROJECT_SERVICES := \
SimpleAggregate

MAIN_SERVICE_FOR_RUST := SimpleAggregate

TRANSLATION_RECORD_PYTHON := \
--translation-record ../dafny-dependencies/StandardLibrary/runtimes/python/src/smithy_dafny_standard_library/internaldafny/generated/dafny_src-py.dtr

Expand Down
2 changes: 2 additions & 0 deletions TestModels/Constructor/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ NAMESPACE=simple.constructor
PROJECT_SERVICES := \
SimpleConstructor

MAIN_SERVICE_FOR_RUST := SimpleConstructor

SERVICE_NAMESPACE_SimpleConstructor=simple.constructor

SERVICE_DEPS_SimpleConstructor :=
Expand Down
4 changes: 4 additions & 0 deletions TestModels/Dependencies/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,15 @@ CORES=2

ENABLE_EXTERN_PROCESSING=1

TRANSPILE_TESTS_IN_RUST=1

include ../SharedMakefile.mk

PROJECT_SERVICES := \
SimpleDependencies

MAIN_SERVICE_FOR_RUST := SimpleDependencies

# Dependencies external to this project
# Order is important
# In java they MUST be built
Expand Down
24 changes: 24 additions & 0 deletions TestModels/Dependencies/runtimes/rust/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[package]
name = "dependencies"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[features]
wrapped-client = []

[dependencies]
aws-smithy-runtime-api = {version = "1.7.0", features = ["client"] }
aws-smithy-types = "1.2.0"
dafny_runtime = { path = "../../../dafny-dependencies/dafny_runtime_rust"}

[dev-dependencies]
dependencies = { path = ".", features = ["wrapped-client"] }

[dependencies.tokio]
version = "1.26.0"
features = ["full"]

[lib]
path = "src/implementation_from_dafny.rs"
2 changes: 2 additions & 0 deletions TestModels/Errors/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ include ../SharedMakefile.mk
PROJECT_SERVICES := \
SimpleErrors

MAIN_SERVICE_FOR_RUST := SimpleErrors

SERVICE_NAMESPACE_SimpleErrors=simple.errors

SERVICE_DEPS_SimpleErrors :=
Expand Down
2 changes: 2 additions & 0 deletions TestModels/LanguageSpecificLogic/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ include ../SharedMakefile.mk
PROJECT_SERVICES := \
LanguageSpecificLogic

MAIN_SERVICE_FOR_RUST := LanguageSpecificLogic

SERVICE_NAMESPACE_LanguageSpecificLogic=language.specific.logic

SERVICE_DEPS_LanguageSpecificLogic :=
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
// Do not modify this file. This file is machine generated, and any changes to it will be overwritten.
// Do not modify this file. This file is machine generated, and any changes to it will be overwritten.
2 changes: 2 additions & 0 deletions TestModels/LocalService/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ NAMESPACE=simple.localService
PROJECT_SERVICES := \
SimpleLocalService

MAIN_SERVICE_FOR_RUST := SimpleLocalService

SERVICE_NAMESPACE_SimpleLocalService=simple.localService

SERVICE_DEPS_SimpleLocalService :=
Expand Down
3 changes: 3 additions & 0 deletions TestModels/MultipleModels/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
CORES=2

ENABLE_EXTERN_PROCESSING=1
TRANSPILE_TESTS_IN_RUST=1

include ../SharedMakefile.mk

Expand All @@ -14,6 +15,8 @@ PROJECT_SERVICES := \
DependencyProject \
PrimaryProject \

MAIN_SERVICE_FOR_RUST := PrimaryProject

SERVICE_NAMESPACE_PrimaryProject=simple.multiplemodels.primaryproject
SERVICE_NAMESPACE_DependencyProject=simple.multiplemodels.dependencyproject

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ namespace simple.multiplemodels.dependencyproject
@aws.polymorph#localService(
sdkId: "DependencyProject",
config: DependencyProjectConfig,
) service DependencyProject {
)
service DependencyProject {
version: "2021-11-01",
resources: [],
operations: [ SomeDependencyOperation ],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
include "SimpleMultiplemodelsDependencyprojectImpl.dfy"

module DependencyProject refines AbstractSimpleMultiplemodelsDependencyprojectService {
module {:extern "simple.multiplemodels.dependencyproject.internaldafny" } DependencyProject refines AbstractSimpleMultiplemodelsDependencyprojectService {
import Operations = SimpleMultiplemodelsDependencyprojectImpl

function method DefaultDependencyProjectConfig(): DependencyProjectConfig {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
include "../Model/SimpleMultiplemodelsDependencyprojectTypesWrapped.dfy"

module WrappedSimpleMultiplemodelsDependencyprojectService refines WrappedAbstractSimpleMultiplemodelsDependencyprojectService {
module {:extern "simple.multiplemodels.dependencyproject.internaldafny.wrapped"} WrappedSimpleMultiplemodelsDependencyprojectService refines WrappedAbstractSimpleMultiplemodelsDependencyprojectService {
import WrappedService = DependencyProject
function method WrappedDefaultDependencyProjectConfig(): DependencyProjectConfig {
DependencyProjectConfig
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use simple.multiplemodels.dependencyproject#SomeDependencyOperation
@aws.polymorph#localService(
sdkId: "PrimaryProject",
config: PrimaryProjectConfig,
dependencies: [ simple.multiplemodels.dependencyproject#DependencyProject ]
) service PrimaryProject {
version: "2021-11-01",
resources: [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
include "SimpleMultiplemodelsPrimaryprojectImpl.dfy"

module PrimaryProject refines AbstractSimpleMultiplemodelsPrimaryprojectService {
module {:extern "simple.multiplemodels.primaryproject.internaldafny" } PrimaryProject refines AbstractSimpleMultiplemodelsPrimaryprojectService {
import Operations = SimpleMultiplemodelsPrimaryprojectImpl

function method DefaultPrimaryProjectConfig(): PrimaryProjectConfig {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
include "../Model/SimpleMultiplemodelsPrimaryprojectTypesWrapped.dfy"

module WrappedSimpleMultiplemodelsPrimaryprojectService refines WrappedAbstractSimpleMultiplemodelsPrimaryprojectService {
module {:extern "simple.multiplemodels.primaryproject.internaldafny.wrapped"} WrappedSimpleMultiplemodelsPrimaryprojectService refines WrappedAbstractSimpleMultiplemodelsPrimaryprojectService {
import WrappedService = PrimaryProject
function method WrappedDefaultPrimaryProjectConfig(): PrimaryProjectConfig {
PrimaryProjectConfig
Expand Down
24 changes: 24 additions & 0 deletions TestModels/MultipleModels/runtimes/rust/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[package]
name = "multiple_models"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[features]
wrapped-client = []

[dependencies]
aws-smithy-runtime-api = {version = "1.7.0", features = ["client"] }
aws-smithy-types = "1.2.0"
dafny_runtime = { path = "../../../dafny-dependencies/dafny_runtime_rust"}

[dev-dependencies]
multiple_models = { path = ".", features = ["wrapped-client"] }

[dependencies.tokio]
version = "1.26.0"
features = ["full"]

[lib]
path = "src/implementation_from_dafny.rs"
2 changes: 2 additions & 0 deletions TestModels/Positional/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ NAMESPACE=simple.positional
PROJECT_SERVICES := \
SimplePositional

MAIN_SERVICE_FOR_RUST := SimplePositional

SERVICE_NAMESPACE_SimplePositional=simple.positional

SERVICE_DEPS_SimplePositional :=
Expand Down
40 changes: 0 additions & 40 deletions TestModels/Positional/runtimes/rust/src/client.rs

This file was deleted.

15 changes: 0 additions & 15 deletions TestModels/Positional/runtimes/rust/src/client/get_resource.rs

This file was deleted.

Loading
Loading