105 releases (65 breaking)

0.67.0 Jun 30, 2024
0.66.1 Feb 23, 2024
0.65.0 Nov 26, 2023
0.63.1 Jul 30, 2023
0.4.0 Nov 4, 2019

#697 in WebAssembly

Download history 1899/week @ 2024-04-03 2555/week @ 2024-04-10 2537/week @ 2024-04-17 2091/week @ 2024-04-24 3313/week @ 2024-05-01 3858/week @ 2024-05-08 3925/week @ 2024-05-15 4290/week @ 2024-05-22 4516/week @ 2024-05-29 4199/week @ 2024-06-05 4932/week @ 2024-06-12 7724/week @ 2024-06-19 6273/week @ 2024-06-26 3893/week @ 2024-07-03 3490/week @ 2024-07-10 3488/week @ 2024-07-17

18,875 downloads per month
Used in 37 crates (19 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.2–9MB
~72K SLoC