103 releases (64 breaking)
0.66.1 | Feb 23, 2024 |
---|---|
0.65.0 | Nov 26, 2023 |
0.63.1 | Jul 30, 2023 |
0.61.0 | Mar 13, 2023 |
0.4.0 | Nov 4, 2019 |
#81 in Text processing
7,744 downloads per month
Used in 35 crates
(18 directly)
265KB
6.5K
SLoC
dprint-core
Rust crate for common dprint code.
Features:
formatting
- Code to help build a code formatter in Rust (not required for creating a plugin).process
- Code to help build a "process plugin"wasm
- Code to help build a "wasm plugin" (recommended over process plugins)
Formatting Api
Use:
let result = dprint_core::formatting::format(|| {
let print_items = ...; // parsed out IR (see example below)
print_items
}, PrintOptions {
indent_width: 4,
max_width: 10,
use_tabs: false,
newline_kind: "\n",
});
Example
See overview.md.
Dependencies
~1–10MB
~73K SLoC