109 releases (65 breaking)

0.67.4 Feb 27, 2025
0.67.2 Oct 14, 2024
0.67.0 Jun 30, 2024
0.66.1 Feb 23, 2024
0.4.0 Nov 4, 2019

#1272 in Database interfaces

Download history 3179/week @ 2025-02-23 2510/week @ 2025-03-02 3256/week @ 2025-03-09 3444/week @ 2025-03-16 3052/week @ 2025-03-23 3383/week @ 2025-03-30 2699/week @ 2025-04-06 2734/week @ 2025-04-13 4161/week @ 2025-04-20 3679/week @ 2025-04-27 4695/week @ 2025-05-04 5255/week @ 2025-05-11 4529/week @ 2025-05-18 3122/week @ 2025-05-25 3180/week @ 2025-06-01 4600/week @ 2025-06-08

15,910 downloads per month
Used in 52 crates (21 directly)

MIT license

270KB
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–8.5MB
~71K SLoC