vcard-rs 0.2.1

vCard parser, validator, editor and builder library for Rust
Documentation

📇 vcard-rs Documentation Coverage Matrix Mastodon Sponsor

vCard parser, validator, editor and builder library for Rust

Table of contents

Features

  • All vCard versions: parse and write 2.1, 3.0 and 4.0 through a single, version-agnostic model.
  • Byte-faithful editing: change one parameter or value and every other byte of the card, line endings included, is preserved exactly.
  • Forgiving parser: accept any real card, even a malformed one, and round-trip it unchanged.
  • Strict building and validation: construct cards checked against the standard, with an escape hatch when you need to step outside it.
  • 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.

RFC coverage

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

Usage

See documentation at docs.rs.

Examples

See complete examples at ./examples.

License

This project is licensed under either of:

Social

Sponsoring

nlnet

Special thanks to the NLnet foundation and the European Commission that have been financially supporting the project for years:

This program is part of Pimalaya, free software funded entirely by grants and donations. If you find it useful, consider sponsoring its development:

GitHub Ko-fi Buy Me a Coffee Liberapay thanks.dev PayPal