Registry / build-tool / rustfmt-wrapper

rustfmt-wrapper

JSON →
library0.2.1rscratesunverified

Library wrapper around rustfmt for use by code generators.

# Cargo.toml [dependencies] rustfmt-wrapper = "0.2.1"
INSTALL
IMPORT
SIG · RUSTFMT-WRAPPER
R
rustfmt-wrapper
build-toolrustv0.2.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

rustfmt
use rustfmt_wrapper::rustfmt;

Format Rust code using rustfmt.

use rustfmt_wrapper::rustfmt; fn main() -> Result<(), Box<dyn std::error::Error>> { let code = "fn main() {}"; let formatted = rustfmt(code)?; println!("{}", formatted); Ok(()) }
Debug
Known issues
gotchaRequires rustfmt to be installed and available in PATH.
fix
Ensure rustfmt is installed via `rustup component add rustfmt`.
affects: >=0.2.0
Upgrade
Version history
0.2.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
11 hits · last 30 days
node
10
OpenAI (training)
1
Resources
rustfmt-wrapper — cargo add rustfmt-wrapper · libregistry