Skip to content

Getting Started

ferrocat is the umbrella crate for the workspace and the recommended entry point for application code.

Install the crate

cargo add ferrocat

The public workspace crates currently line up like this:

  • ferrocat: umbrella crate and default dependency
  • ferrocat-po: PO parsing, serialization, merge helpers, and high-level catalog update APIs
  • ferrocat-icu: ICU MessageFormat parsing and structural helpers

Quick start

use ferrocat::{SerializeOptions, parse_po, stringify_po};

let mut file = parse_po(
    r#"
msgid "hello"
msgstr "world"
"#,
)?;

file.items[0].msgstr = "Welt".to_owned().into();

let rendered = stringify_po(&file, &SerializeOptions::default());
assert!(rendered.contains(r#"msgstr "Welt""#));
# Ok::<(), Box<dyn std::error::Error>>(())

Where to go next

Compatibility policy

  • MSRV: Rust 1.85
  • Semver: the public API is treated seriously, but the project is still pre-1.0
  • Docs surface: README examples, rustdoc, and the site should stay aligned

Site-specific development

For the documentation site itself:

pnpm install
pnpm dev
pnpm build