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

Adds new model changes for Rust code generation #147

Merged

Conversation

desaikd
Copy link
Contributor

@desaikd desaikd commented Sep 27, 2024

Issue #136

Description of changes:

This PR adds new model changes for Rust code generation.

List of changes:

Generated code:

The generated code still stays the same only the template changes to use the new model.

Generated Rust code can be found here.

Tests:

Add roundtrip tests for Rust code.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

* Adds changes for using the new model
* Adds changes for nested types to use template macros
* Add `string_representation` on `FullyQualifiedTypeReference` which
will have namespace representated based on programming language
* Modifies serializer for `AbstractDataType` to include ISL type name
when serializing source `IslType`
src/bin/ion/commands/generate/mod.rs Outdated Show resolved Hide resolved
src/bin/ion/commands/generate/model.rs Outdated Show resolved Hide resolved
src/bin/ion/commands/generate/model.rs Outdated Show resolved Hide resolved
src/bin/ion/commands/generate/model.rs Outdated Show resolved Hide resolved
src/bin/ion/commands/generate/utils.rs Outdated Show resolved Hide resolved
src/bin/ion/commands/generate/utils.rs Outdated Show resolved Hide resolved
* Doc comment changes
* Renames `has_no_name` to `is_anonymous`
* Removes completed TODOs for rust templates
@desaikd desaikd requested review from zslayton and popematt October 1, 2024 18:39
@desaikd desaikd merged commit d710bd8 into amazon-ion:new-model-changes Oct 2, 2024
3 checks passed
desaikd added a commit to desaikd/ion-cli that referenced this pull request Nov 1, 2024
* Adds changes for Rust templates
* Add `string_representation` on `FullyQualifiedTypeReference` which
will have namespace represented based on programming language
* Add tests for Rust code generation
desaikd added a commit that referenced this pull request Nov 1, 2024
* Adds new model changes for `Structure` (#138)
* Adds new model changes for scalar (#143)
* Adds changes for sequence data type (#144)
* Adds tests for new model changes (#146)
* Adds new model changes for Rust code generation (#147)
* Adds changes for optional/required fields in Java code generation (#148)
* Modifies generated setter API to take nested types instead of nested properties (#153)
* Adds support for builder API generation in Java (#154)
* Adds support for Java enum generation (#158)
* Adds namespace fix for nested sequence and adds support for nested types in Sequence and Scalar ADT (#163)
* Adds changes for nested type naming (#166)
* Adds support for imports in code generation (#169)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants