mirror of
https://github.com/BigMarc/grammargem.git
synced 2026-10-13 17:01:55 +02:00
Replace the NSSpellChecker + regex-stub engine with harper-core 2.5.0: real subject-verb agreement, verb forms, punctuation, repetition and spelling. New harper-ffi crate (staticlib) exposes harper_check over a C ABI; the CHarper module bridges it to Swift; HarperEngine maps Harper's char spans onto UTF-16 ranges and de-dups overlapping lints. NSSpellChecker stays only as a case-preserving spelling supplement, which fixes the problemm->Problem mis-casing. Bulk apply now skips no-op suggestions. build.sh / scripts/build.sh build the universal static lib; target/ and lib/ are gitignored (regenerate via harper-ffi/build.sh). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
22 lines
498 B
TOML
22 lines
498 B
TOML
[package]
|
|
name = "harper-ffi"
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
|
|
[lib]
|
|
# Static library exposing a C ABI for linking into the Swift app.
|
|
name = "harper_ffi"
|
|
crate-type = ["staticlib"]
|
|
|
|
[dependencies]
|
|
# harper-core 2.5.0 — the grammar checker from the Automattic Harper project.
|
|
# Verified against https://docs.rs/harper-core/2.5.0/
|
|
harper-core = "2.5.0"
|
|
# Used to build the output JSON with correct string escaping.
|
|
serde_json = "1"
|
|
|
|
[profile.release]
|
|
opt-level = 3
|
|
lto = true
|
|
codegen-units = 1
|