Skip to content

Conversation

iamnamananand996
Copy link
Contributor

closes: #9125

Description

This PR adds automatic code formatting to the Rust SDK and Model generators using rustfmt. The implementation
includes post-processing formatting that runs after code generation to ensure all generated Rust code follows consistent formatting standards.

Changes Made

  • Added rustfmt post-processing to both Rust SDK and Model generators
  • Installed Rust toolchain with rustfmt component in Docker containers for both generators
  • Created shared RustFormatter utility in rust-base module to eliminate code duplication
  • Updated rustfmt.toml configuration to use stable features compatible with Docker environment
  • Formatted existing asIs template files to ensure consistency across all generated code

Testing

  • Unit tests added/updated
  • Manual testing completed
  • Verified rustfmt runs successfully in both local and Docker environments

@iamnamananand996
Copy link
Contributor Author

cc - @musicpulpite

@musicpulpite
Copy link
Collaborator

I can admin merge this for you @iamnamananand996 if you are ready? And will look into removing these jobs from the PR checklist to help unblock you going forward!

@iamnamananand996
Copy link
Contributor Author

I can admin merge this for you @iamnamananand996 if you are ready? And will look into removing these jobs from the PR checklist to help unblock you going forward!

Hi @musicpulpite, Yes this is ready to merge.

@musicpulpite musicpulpite merged commit de091e6 into fern-api:main Sep 16, 2025
36 of 38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Rust SDK: Support rustfmt formatting support to Rust SDK generator
3 participants