io-jmap 0.3.0

JMAP client library for Rust
Documentation

I/O JMAP Documentation Matrix Mastodon Sponsor

JMAP client library for Rust

This library is composed of 3 feature-gated layers:

  • Low-level I/O-free coroutines: no_std-compatible state machines containing the whole JMAP logic, usable anywhere
  • Mid-level light client: a standard, blocking client wrapping a stream you opened yourself
  • High-level full client: the light client plus TCP connections and TLS negotiations handled for you

Table of contents

Features

  • Session discovery: resolves the JMAP session from a base URL or the well-known endpoint, surfacing redirects to the caller instead of following them.
  • Core protocol: batched method calls, generic get, set, query and changes flows, blob upload and download.
  • Push notifications: push subscription management and the streaming Event Source channel, yielding one state change per push frame with cooperative shutdown.
  • Mail: mailboxes, emails, threads, identities, email submissions and vacation responses.
  • Contacts: address books and contact cards, the JSContact payload kept as raw JSON.
  • Calendars: calendars and calendar events, read-only for now, the JSCalendar payload kept as raw JSON and recurrence expanded by the server.
  • Full client with TLS support:
    • Rustls with ring crypto (requires rustls-ring feature, enabled by default)
    • Rustls with aws crypto (requires rustls-aws feature)
    • Native TLS (requires native-tls feature)

[!TIP] I/O JMAP is written in Rust and uses cargo features to gate the client layers. The default feature set is declared in Cargo.toml or on docs.rs.

RFC coverage

RFC What is covered
8620 JMAP core: session discovery, batched API requests, generic get, set, query and changes methods, blobs, push (Event Source, PushSubscription)
8621 JMAP for Mail: Mailbox, Email, Thread, Identity, EmailSubmission, VacationResponse
9610 JMAP for Contacts: AddressBook, ContactCard (JSContact payload kept as raw JSON)
draft JMAP for Calendars: Calendar, CalendarEvent (JSCalendar payload kept as raw JSON), reads only: get, changes, query

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