-
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.
Update fixed feat-rust commit in CI, test tip of feat-rust in nightly (…
…#506) Dafny's `feat-rust` branch made forwards-thinking changes to the Rust code generator, mainly to assume for now that all generated code is contained in a single crate. This breaks our current design for how smithy-dafny libraries are constructed. This change refactors the structure of smithy-dafny `runtimes/rust` generated projects to fit this limitation, at least for now. * Because Dafny outputs Rust code assuming that it will live at the top-level namespace, `Cargo.toml` files now specify that `implementation_from_dafny.rs` is the main `lib` file instead of the manually-written `lib.rs` files so far. Instead we apply a patch to `implementation_from_dafny.rs` to declare the additional modules. * Rather than depend on the smithy-dafny StandardLibrary code as a separate crate, modified the shared makefile to not use `-library` when compiling to Rust, so that included Dafny code is just inlined as it is transpiled. * This also unfortunately means we have to include the `conversions` module from the StandardLibrary inline in each library. * As a side-effect of the one-crate assumption, compiling Dafny tests to Rust integration tests no longer works (since those are implicitly separate crates). Instead we make use of the new feature on `feat-rust` to compile Dafny `{:test}` attributes directly to Rust `#[test]` attributes. * This required customizing the shared makefile further for Rust, to (optionally) include the Dafny test files as well as source when transpiling to Rust. Also improved the Dafny nightly build to test on Rust using the latest commit from `feat-rust`, so that any other similar breaking changes are caught in the future. To review this PR, it should suffice to focus on the SmithyDafnyMakefile.mk changes and skim the search-and-replace changes to `kms-lite` and one other non-SDK test model.
- Loading branch information
Showing
267 changed files
with
49,269 additions
and
4,999 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
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.