94 releases (60 breaking)
new 0.62.0 | Jun 3, 2023 |
---|---|
0.61.0 | Mar 13, 2023 |
0.60.0 | Dec 7, 2022 |
0.59.1 | Nov 20, 2022 |
0.4.0 | Nov 4, 2019 |
#388 in Web programming
7,470 downloads per month
Used in 29 crates
(14 directly)
240KB
6K
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–7MB
~115K SLoC