rust-lang / rust-lang/rustfmt

Document how to use rustfmt as a library

Open
#3,257 5 comments 15 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Since there is a public API and there are various references to a rustfmt library in various issues here, it seems like it should be possible to use rustfmt as a library. However, most of the public API is not documented and I have not found a way of simply giving rustfmt some rust source code an having it format that.

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.

Research direction

The issue mentions rustfmt's public API and its use as a library, but names no files or tests. Start by locating the public library API and existing references to it, then document how to provide Rust source and what the formatting result looks like.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.