114 releases (12 stable)

Uses new Rust 2024

new 1.10.0 Mar 11, 2026
1.5.1 Jan 22, 2026
1.3.0 Dec 22, 2025
1.0.0 Nov 28, 2025
0.8.3 Mar 25, 2024

#140 in Text processing

Download history 98/week @ 2025-11-26 113/week @ 2025-12-03 99/week @ 2025-12-10 86/week @ 2025-12-17 59/week @ 2025-12-24 57/week @ 2025-12-31 146/week @ 2026-01-07 110/week @ 2026-01-14 143/week @ 2026-01-21 83/week @ 2026-01-28 101/week @ 2026-02-04 142/week @ 2026-02-11 116/week @ 2026-02-18 368/week @ 2026-02-25 241/week @ 2026-03-04 261/week @ 2026-03-11

1,013 downloads per month
Used in 13 crates

Apache-2.0

6MB
68K SLoC

harper-core

harper-core is the fundamental engine behind Harper, the private grammar checker.

harper-core is available on crates.io to enable Rust engineers to integrate high-quality grammar checking directly into their apps and workflows. Feel free to use harper-core in your projects. If you run into problems with the code, open an issue or, even better, create a pull request. We are also happy to chat with you on Discord.

The documentation for harper-core is available online.

If you would prefer to run Harper from inside a JavaScript runtime, we have a package for that as well.

Example

Here's what a full end-to-end linting pipeline could look like using harper-core.

use harper_core::linting::{LintGroup, Linter};
use harper_core::parsers::PlainEnglish;
use harper_core::spell::FstDictionary;
use harper_core::{Dialect, Document};

let text = "This is an test.";
let parser = PlainEnglish;

let document = Document::new_curated(text, &parser);

let dict = FstDictionary::curated();
let mut linter = LintGroup::new_curated(dict, Dialect::American);

let lints = linter.lint(&document);

for lint in lints {
    println!("{:?}", lint);
}

Features

concurrent: Whether to use thread-safe primitives (Arc vs Rc). Disabled by default. It is not recommended unless you need thread-safely (i.e. you want to use something like tokio).

Other Relevant Packages

Dependencies

~78–120MB
~2M SLoC