harper/harper-core
Elijah Potter 073f60638b
Some checks failed
Binaries / harper-ls - Windows-x86_64 (push) Has been cancelled
Build Web / build-web (push) Has been cancelled
Binaries / harper-cli - macOS-aarch64 (push) Has been cancelled
Binaries / harper-cli - Linux-aarch64-GNU (push) Has been cancelled
Binaries / harper-cli - Linux-aarch64-musl (push) Has been cancelled
Binaries / harper-cli - macOS-x86_64 (push) Has been cancelled
Binaries / harper-cli - Linux-x86_64-GNU (push) Has been cancelled
Binaries / harper-cli - Linux-x86_64-musl (push) Has been cancelled
Binaries / harper-cli - Windows-x86_64 (push) Has been cancelled
Binaries / harper-ls - macOS-aarch64 (push) Has been cancelled
Binaries / harper-ls - Linux-aarch64-GNU (push) Has been cancelled
Binaries / harper-ls - Linux-aarch64-musl (push) Has been cancelled
Binaries / harper-ls - macOS-x86_64 (push) Has been cancelled
Binaries / harper-ls - Linux-x86_64-GNU (push) Has been cancelled
Binaries / harper-ls - Linux-x86_64-musl (push) Has been cancelled
Just Checks / just test-vscode (push) Has been cancelled
WordPress Plugin / wp-plugin (push) Has been cancelled
VS Code Plugin / alpine-arm64 (push) Has been cancelled
VS Code Plugin / alpine-x64 (push) Has been cancelled
Chrome Plugin / chrome-plugin (push) Has been cancelled
Just Checks / just check-js (push) Has been cancelled
VS Code Plugin / darwin-x64 (push) Has been cancelled
Just Checks / just check-rust (push) Has been cancelled
Just Checks / just test-chrome-plugin (push) Has been cancelled
Just Checks / just test-firefox-plugin (push) Has been cancelled
Just Checks / just test-harperjs (push) Has been cancelled
Just Checks / just test-obsidian (push) Has been cancelled
Just Checks / just test-rust (push) Has been cancelled
VS Code Plugin / darwin-arm64 (push) Has been cancelled
VS Code Plugin / linux-arm64 (push) Has been cancelled
VS Code Plugin / linux-armhf (push) Has been cancelled
VS Code Plugin / linux-x64 (push) Has been cancelled
VS Code Plugin / win32-arm64 (push) Has been cancelled
VS Code Plugin / win32-x64 (push) Has been cancelled
Release 1.3.0
harper-brill@1.3.0
harper-comments@1.3.0
harper-core@1.3.0
harper-html@1.3.0
harper-ink@1.3.0
harper-jjdescription@1.3.0
harper-literate-haskell@1.3.0
harper-ls@1.3.0
harper-pos-utils@1.3.0
harper-python@1.3.0
harper-stats@1.3.0
harper-tree-sitter@1.3.0
harper-typst@1.3.0

Generated by cargo-workspaces
2025-12-22 14:38:51 -07:00
..
benches feat(core): create SplitWords linter (#2118) 2025-10-29 16:43:17 -06:00
src feat: every once and again→every once in a while & once again (#2361) 2025-12-22 20:38:20 +00:00
tests Dictionary curation 2025 12 10 (#2336) 2025-12-22 20:30:01 +00:00
annotations.json feat: adding prefixes to dictionary (#2212) 2025-12-11 19:00:29 +00:00
Cargo.toml Release 1.3.0 2025-12-22 14:38:51 -07:00
clippy.toml Added long_sentences and changed linter API 2024-01-20 19:43:59 -07:00
dictionary.dict feat: as nauseam→ad nauseam (#2354) 2025-12-22 20:38:11 +00:00
irregular_nouns.json Irregular verbs (#2285) 2025-12-08 16:30:04 +00:00
irregular_verbs.json Irregular verbs (#2285) 2025-12-08 16:30:04 +00:00
proper_noun_rules.json feat(core): more rules (#2107) 2025-11-05 08:27:25 -07:00
README.md hotfix(core): properly format example 2025-12-09 11:40:02 -07:00

harper-core

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

harper-core is available on crates.io. However, improving the API is not currently a high priority. Feel free to use harper-core in your projects. If you run into issues, create a pull request.

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).