rust-lang / rust-lang/rustfmt

allow streaming formatting

Open
#6,944 4 comments 0 reactions 1 assignee View on GitHub

Nobody has claimed this yet.

C-feature-request P-low
Dominant language
Rust
Stars
7k
Forks
1.1k
Avg merge
2d 13h
Merged PRs (30d)
24

Description

Feature Request

Summary

Allow streaming formatting

Motivation

Windows process startup time is 30ms. Therefore, a function call to format rust code using rustfmt will take at least 30ms on windows. If streaming was allowing using start and end markers, then it would be possible to build a rustfmt process pool that could format rust code without the 30ms startup overhead.

I don't think this would add much maintenance burden, because this would just call format_string internally.

Related configuration options

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.