vCard parser, validator, editor, merger and builder library for Rust
- All vCard versions: parse and write 2.1, 3.0 and 4.0 through one version-agnostic model.
- Byte-faithful editing: change one parameter or value and every other byte of the card comes back unchanged, line endings included.
- Forgiving parser: accept any real card, even a malformed one, and round-trip it unchanged, its folds and blank lines included.
- Strict building and validation: construct cards checked against the standard, with an escape hatch to step outside it.
- Three-way merge: reconcile two divergent edits of a card against their common base, every action and conflict reported.
- Small and portable: no_std compatible, with an allocation-only core that pulls in no dependencies.
- Optional content decoding: quoted-printable text, inline base64 binary and foreign character sets, each behind its own feature.
- Optional jCard: read and write a card as JSON.
- Optional JSContact: convert a card to and from the Card object exchanged over JMAP.
Tip
vcard-rs uses cargo features to gate optional support. The default feature set is declared in Cargo.toml or on docs.rs.
| Spec | What is covered |
|---|---|
| 2.1 | vCard 2.1: the original versit format, including its quoted-printable and charset conventions |
| 2425 | text/directory: bare directory records carrying no BEGIN and END envelope |
| 2426 | vCard 3.0 |
| 6350 | vCard 4.0: the current standard, with its full property set, value types and parameters |
| 7095 | jCard: the JSON representation of a card |
| 9553 | JSContact: the Card object model exchanged over JMAP |
| 9554 | vCard format extensions: the newer properties and the extended address components, modeled first-class |
| 9555 | JSContact vCard mapping: the lossless conversion between a card and a JSContact Card |
See documentation at docs.rs.
See complete examples at ./examples.
This project is licensed under either of:
- Chat on Matrix
- News on Mastodon or RSS
- Mail at pimalaya.org@posteo.net
Special thanks to the NLnet foundation and the European Commission that have been financially supporting the project for years:
- 2022 → 2023: NGI Assure
- 2023 → 2024: NGI Zero Entrust
- 2024 → 2026: NGI Zero Core
- 2026 → 2027: NGI Zero Commons Fund
This program is part of Pimalaya, free software funded entirely by grants and donations. If you find it useful, consider sponsoring its development:
