Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ This project follows [Semantic Versioning](https://semver.org/).

## [Unreleased]

### Changed
- Document locale and threading caveats in the README
- Drop obsolete `unexpected_cfgs` lint (no longer needed after objc2)

## [0.2.1] - 2026-08-07

### Added
Expand Down
3 changes: 0 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,3 @@ hunspell-sys = "0.3.1"

[dependencies]
cfg-if = "1.0.4"

[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(feature, values("cargo-clippy"))'] }
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ This is a **maintained fork** of [euclio/spellbound](https://github.com/euclio/s
use spellbound::Checker;

fn main() -> Result<(), spellbound::Error> {
let mut checker = Checker::new()?;
let checker = Checker::new()?;
// Or: Checker::with_locale("en-US")?;

for err in checker.check("I beleeve I can fly") {
Expand All @@ -36,7 +36,17 @@ fn main() -> Result<(), spellbound::Error> {
}
```

Checker::new() defaults to English (en_US /en_GB on Linux, en-US on Windows). Use with_locale for another language. Locales may be written as en_US or en-US.
`Checker::new()` defaults to English (`en_US` / `en_GB` on Linux, `en-US` on Windows). Use `with_locale` for another language. Locales may be written as `en_US` or `en-US`.

Unknown or unsupported locales behave differently by platform:

- **Linux:** missing dictionary / unknown locale → `Error::Unavailable`
- **macOS:** empty locale → `Error::Unavailable`; unknown tags may still create a checker (system fallback)
- **Windows:** unsupported language tag → `Error::Unavailable`

## Threading

macOS serializes access to the shared `NSSpellChecker`. Do not assume `Checker` is `Send` / `Sync` across platforms.

## Linux

Expand Down
Loading