Skip to content

Conversation

@ptechen
Copy link

@ptechen ptechen commented Sep 29, 2025

feat(macro): Preserve attribute macros on structs

  • Retain the original struct's attribute macros in the generated Rust code
  • Ensure attribute macros are correctly applied to the generated structs
  • Add parsing and passing logic for struct attributes

feat(rust2go): Add struct field tag generation feature

  • Introduce the heck crate for field name conversion
  • Implement the r2g_struct_tag macro to support custom struct tags
  • Add JSON and YAML tags to generated Go structs
  • Support multiple naming conventions: snake_case, camelCase, etc.
  • Update test cases to verify tag generation logic
  • Export the new r2g_struct_tag macro for external use

- Retain the original struct's attribute macros in the generated Rust code
-Ensure attribute macros are correctly applied to the generated structs
- Add parsing and passing logic for struct attributes
@ptechen ptechen mentioned this pull request Sep 29, 2025
- Introduce the heck crate for field name conversion
- Implement the r2g_struct_tag macro to support custom struct tags
- Add JSON and YAML tags to generated Go structs
- Support multiple naming conventions: snake_case, camelCase, etc.
- Update test cases to verify tag generation logic
- Export the new r2g_struct_tag macro for external use
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.

2 participants