-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: use --rust-module-name (#673)
Transpile Rust code with --rust-module-name, meaning that then generated implementation_from_dafny.rs file should not need to be edited; rather, a hand written lib.rs file is used instead. The post-transpile patching steps were removed. Most of the files changed are to bring each TestModel to the new scheme, i.e. we remove implementation_from_dafny.rs from the cargo.toml file and create a lib.rs file. The version of Dafny used for testing was also bumped up to the current HEAD.
- Loading branch information
1 parent
e572afd
commit 180ad67
Showing
70 changed files
with
723 additions
and
840 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#![allow( | ||
deprecated, | ||
non_upper_case_globals, | ||
unused, | ||
non_snake_case, | ||
non_camel_case_types | ||
)] | ||
|
||
pub mod client; | ||
pub mod conversions; | ||
pub mod deps; | ||
/// Common errors and error handling utilities. | ||
pub mod error; | ||
pub(crate) mod implementation_from_dafny; | ||
/// All operations that this crate can perform. | ||
pub mod operation; | ||
mod standard_library_conversions; | ||
mod standard_library_externs; | ||
pub mod types; | ||
pub mod wrapped; | ||
pub(crate) use crate::implementation_from_dafny::r#_Wrappers_Compile; | ||
pub(crate) use crate::implementation_from_dafny::simple; | ||
pub use crate::types::simple_aggregate_config::SimpleAggregateConfig; | ||
pub use client::Client; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#![allow( | ||
deprecated, | ||
non_upper_case_globals, | ||
unused, | ||
non_snake_case, | ||
non_camel_case_types | ||
)] | ||
|
||
pub mod client; | ||
pub mod conversions; | ||
pub mod deps; | ||
/// Common errors and error handling utilities. | ||
pub mod error; | ||
pub(crate) mod implementation_from_dafny; | ||
/// All operations that this crate can perform. | ||
pub mod operation; | ||
mod standard_library_conversions; | ||
mod standard_library_externs; | ||
pub mod types; | ||
pub mod wrapped; | ||
pub(crate) use crate::implementation_from_dafny::r#_Wrappers_Compile; | ||
pub(crate) use crate::implementation_from_dafny::simple; | ||
pub use crate::types::simple_constraints_config::SimpleConstraintsConfig; | ||
pub use client::Client; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#![allow( | ||
deprecated, | ||
non_upper_case_globals, | ||
unused, | ||
non_snake_case, | ||
non_camel_case_types | ||
)] | ||
|
||
pub mod client; | ||
pub mod conversions; | ||
pub mod deps; | ||
/// Common errors and error handling utilities. | ||
pub mod error; | ||
pub(crate) mod implementation_from_dafny; | ||
/// All operations that this crate can perform. | ||
pub mod operation; | ||
mod standard_library_conversions; | ||
mod standard_library_externs; | ||
pub mod types; | ||
pub mod wrapped; | ||
pub(crate) use crate::implementation_from_dafny::r#_Wrappers_Compile; | ||
pub(crate) use crate::implementation_from_dafny::simple; | ||
pub use crate::types::simple_constructor_config::SimpleConstructorConfig; | ||
pub use client::Client; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#![allow( | ||
deprecated, | ||
non_upper_case_globals, | ||
unused, | ||
non_snake_case, | ||
non_camel_case_types | ||
)] | ||
|
||
pub mod client; | ||
pub mod conversions; | ||
pub mod deps; | ||
/// Common errors and error handling utilities. | ||
pub mod error; | ||
pub(crate) mod implementation_from_dafny; | ||
/// All operations that this crate can perform. | ||
pub mod operation; | ||
mod standard_library_conversions; | ||
mod standard_library_externs; | ||
pub mod types; | ||
pub mod wrapped; | ||
pub(crate) use crate::implementation_from_dafny::_Wrappers_Compile; | ||
pub(crate) use crate::implementation_from_dafny::_WrappedSimpleDependenciesTest_Compile; | ||
pub(crate) use crate::implementation_from_dafny::simple; | ||
pub use crate::types::simple_dependencies_config::SimpleDependenciesConfig; | ||
pub use client::Client; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#![allow( | ||
deprecated, | ||
non_upper_case_globals, | ||
unused, | ||
non_snake_case, | ||
non_camel_case_types | ||
)] | ||
|
||
pub mod client; | ||
pub mod conversions; | ||
pub mod deps; | ||
/// Common errors and error handling utilities. | ||
pub mod error; | ||
pub(crate) mod implementation_from_dafny; | ||
/// All operations that this crate can perform. | ||
pub mod operation; | ||
mod standard_library_conversions; | ||
mod standard_library_externs; | ||
pub mod types; | ||
pub(crate) use crate::implementation_from_dafny::r#_Wrappers_Compile; | ||
pub(crate) use crate::implementation_from_dafny::simple; | ||
pub use crate::types::simple_documentation_config::SimpleDocumentationConfig; | ||
pub use client::Client; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#![allow( | ||
deprecated, | ||
non_upper_case_globals, | ||
unused, | ||
non_snake_case, | ||
non_camel_case_types | ||
)] | ||
|
||
pub mod client; | ||
pub mod conversions; | ||
pub mod deps; | ||
/// Common errors and error handling utilities. | ||
pub mod error; | ||
pub(crate) mod implementation_from_dafny; | ||
/// All operations that this crate can perform. | ||
pub mod operation; | ||
mod standard_library_conversions; | ||
mod standard_library_externs; | ||
pub mod types; | ||
pub mod wrapped; | ||
pub(crate) use crate::implementation_from_dafny::r#_Wrappers_Compile; | ||
pub(crate) use crate::implementation_from_dafny::simple; | ||
pub use crate::types::simple_errors_config::SimpleErrorsConfig; | ||
pub use client::Client; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#![allow( | ||
deprecated, | ||
non_upper_case_globals, | ||
unused, | ||
non_snake_case, | ||
non_camel_case_types | ||
)] | ||
|
||
pub mod client; | ||
pub mod conversions; | ||
pub mod deps; | ||
/// Common errors and error handling utilities. | ||
pub mod error; | ||
pub(crate) mod implementation_from_dafny; | ||
/// All operations that this crate can perform. | ||
pub mod operation; | ||
mod standard_library_conversions; | ||
mod standard_library_externs; | ||
pub mod types; | ||
pub mod wrapped; | ||
pub mod factory; | ||
pub(crate) use crate::implementation_from_dafny::_SimpleExtendableResourcesTest_Compile; | ||
pub(crate) use crate::implementation_from_dafny::_WrappedTest_Compile; | ||
pub(crate) use crate::implementation_from_dafny::_Wrappers_Compile; | ||
pub(crate) use crate::implementation_from_dafny::simple; | ||
pub use crate::types::simple_extendable_resources_config::SimpleExtendableResourcesConfig; | ||
pub use client::Client; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 19 additions & 16 deletions
35
TestModels/LanguageSpecificLogic/runtimes/rust/src/lib.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,27 @@ | ||
#![allow(deprecated)] | ||
|
||
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. | ||
#![allow( | ||
deprecated, | ||
non_upper_case_globals, | ||
unused, | ||
non_snake_case, | ||
non_camel_case_types | ||
)] | ||
|
||
pub mod client; | ||
pub mod types; | ||
|
||
pub mod conversions; | ||
pub mod deps; | ||
pub mod externs; | ||
/// Common errors and error handling utilities. | ||
pub mod error; | ||
|
||
pub(crate) mod implementation_from_dafny; | ||
/// All operations that this crate can perform. | ||
pub mod operation; | ||
mod standard_library_conversions; | ||
mod standard_library_externs; | ||
pub mod types; | ||
|
||
mod conversions; | ||
|
||
pub mod implementation_from_dafny; | ||
|
||
mod externs; | ||
|
||
#[cfg(feature = "wrapped-client")] | ||
pub mod wrapped; | ||
|
||
pub(crate) use crate::implementation_from_dafny::_Wrappers_Compile; | ||
pub(crate) use crate::implementation_from_dafny::UTF8; | ||
pub(crate) use crate::implementation_from_dafny::language; | ||
pub(crate) use crate::implementation_from_dafny::_LanguageSpecificLogicImpl_Compile; | ||
pub use crate::types::language_specific_logic_config::LanguageSpecificLogicConfig; | ||
pub use client::Client; | ||
pub use types::language_specific_logic_config::LanguageSpecificLogicConfig; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.