108 releases (65 breaking)

0.67.3 Feb 2, 2025
0.67.2 Oct 14, 2024
0.67.1 Aug 16, 2024
0.67.0 Jun 30, 2024
0.4.0 Nov 4, 2019

#929 in WebAssembly

Download history 3094/week @ 2024-10-26 3104/week @ 2024-11-02 2696/week @ 2024-11-09 2514/week @ 2024-11-16 2510/week @ 2024-11-23 3206/week @ 2024-11-30 3250/week @ 2024-12-07 3024/week @ 2024-12-14 1950/week @ 2024-12-21 1798/week @ 2024-12-28 3642/week @ 2025-01-04 4467/week @ 2025-01-11 4004/week @ 2025-01-18 3797/week @ 2025-01-25 5244/week @ 2025-02-01 3187/week @ 2025-02-08

17,164 downloads per month
Used in 49 crates (20 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.1–9MB
~74K SLoC