Skip to content

Conversation

@ajakubowicz-canva
Copy link
Collaborator

Context

This PR follows the recommendation in Zulip of doing what ash does: ash-rs/ash#735

Zulip thread: #rust > A plan for SIMD @ 💬

Changes

The first commit contains the logic changes to the CLI. The second commit contains rustfmt.

  • Added the missing wasm module such that running the CLI with no arguments regenerates WASM.
  • Added some documentation to the CLI and piped through rustfmt.
  • Ran the generator (getting formatted output).
  • Formatted the entire codebase.

Test plan

Manually ran CLI. No logic changes in the generator (just formatting).

Comment on lines 122 to 132
fn write_formatted(text: &[u8], out: File) -> std::process::Child {
let mut child = std::process::Command::new("rustfmt")
.stdin(std::process::Stdio::piped())
.stdout(out)
.spawn()
.expect("`rustfmt` command to have spawned");
let mut stdin = child.stdin.take().expect("stdin handle to be present");
stdin.write_all(text).unwrap();
drop(stdin);
child
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like the waiting can just happen in the method instead of returning the process and then waiting in main.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done: raphlinus@7d47ce1 Thank you!

@ajakubowicz-canva ajakubowicz-canva merged commit b4d7d0f into main Jun 19, 2025
6 checks passed
@ajakubowicz-canva ajakubowicz-canva deleted the ajakubowicz-rustfmt branch June 19, 2025 09:11
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