cfarewell 0.1.0

Locale-correct valedictions for formal correspondence
Documentation
cfarewell-0.1.0 has been yanked.

cfarewell

Deterministic locale-correct valedictions for formal correspondence. No models, no I/O: same input always yields the same output.

use cfarewell::closing;

assert_eq!(closing("de-CH", None), "Freundliche Grüsse");
assert_eq!(closing("en-US", None), "Sincerely,");

Locales are BCP 47 codes. Unknown locales fall back through the base language to English (fr-BE → fr, xx → en), mirroring the resolution the CareerVector product uses. An explicit override always wins.

Use

Rust:

[dependencies]
cfarewell = "0.1"

TypeScript (zero dependencies, runs in browsers, edge runtimes, and Node):

npm install @corbet-labs/cfarewell

Run cargo test, cargo fmt --check, and cargo clippy --all-targets -- -D warnings before pushing.

Contract for ports

Behavior is defined by data: tables/closing.json holds the valediction per locale (schema in tables/README.md) and tests/vectors/*.json is the executable conformance suite every language port runs. The Typst module in typst/ is generated from the same table. A port is done when every vector passes; add vectors whenever behavior changes.

License

FSL-1.1-ALv2; see LICENSES/FSL-1.1-ALv2.txt. Each published version becomes available under Apache-2.0 two years after publication.