ZEMAIL-CORE // ENGINEERING REPORT

// module map · command surface · FFI exports · test status

Home Source
0.1.0version
3crate-types (rlib · staticlib · cdylib)
103engine commands
4C-ABI exports

zemail-core is in active development. The figures on this page are derived from the crate source as it stands today (Cargo.toml, src/lib.rs, src/ffi.rs): version, crate-types, the dotted commands matched in Engine::invoke, and the exported C symbols. The "planned" column lists work that is not yet implemented — it is a roadmap, not a claim of coverage.

Module map

modulerole todayplanned
lib (Engine)one dotted command surface via Engine::invoke; event sink; folder seedingmore dispatch coverage as modules grow
modelaccount · identity · server config · folder · message · contact · filter typesricher flags, threading model
storeprofile load/save; import eml · mbox · maildirpersistent message store, indexing
mimeRFC 5322 / MIME parsing via mail-parsercompose · attachment encoding
searchin-memory query over messagesfull-text index, saved searches
glodaglobal relevance-ranked search over an inverted TF-IDF index of the whole store (Thunderbird Gloda analogue); dependency-freepersistent index, phrase queries
filtersconditions + actions (mark · star · label · move · delete)scheduled runs, more conditions
junkadaptive junk filter — multinomial naive-Bayes over message tokens; trained counts persist in the profileheader features, per-account models
mailappscross-app pure logic: categorize · unsubscribe extraction and the stateful surface for snooze · send-later · mute · VIP · pin · scheduled send · self-destruct · Screener · templates · follow-up (Gmail, Apple Mail, Outlook, ProtonMail, Hey, Spark/Superhuman, RFC 8058)richer rules, server-side sync
calendariCalendar (RFC 5545) meeting-invite parsing + METHOD:REPLY RSVP generation (Thunderbird/Lightning, Outlook, Apple Mail); pure string handlingrecurrence rules, free/busy
addressbookvCard import/export; contactsgroups, autocomplete, dedupe
carddav (feature carddav)CardDAV address-book pull/push of vCards over WebDAV (ureq native-tls + quick_xml), reusing the addressbook parserincremental sync, ctag/etag
net (feature net)IMAP sync · SMTP send over one native-tls stackincremental sync, OAuth, idle
openpgp (feature openpgp)OpenPGP crypto via rPGP (pure-Rust): keygen, detached sign/verify, encrypt/decrypt over ASCII armorkey discovery, subkey management
smime (feature smime)S/MIME crypto — CMS (RFC 5652) over X.509 + RSA via RustCrypto: gen cert, sign/verify, encrypt/decrypt (PEM / base64 DER)cert chain validation, AES-GCM
errorengine Result + Error with stable machine tags for a {error:{tag,message}} FFI envelopemore granular tags
utildependency-free helpers — a standard Base64 (RFC 4648) codec for the JSON/FFI boundary
ffiC ABI: zml_init · zml_invoke · zml_set_event_callback · zml_string_freeheader generation, richer event payloads
tauri_plugin (feature tauri)Tauri v2 plugin glue for GUI hostsmountable webui component

Build surfaces

The crate declares crate-type = ["rlib", "staticlib", "cdylib"]. The rlib links natively into Rust/Tauri hosts; the staticlib/cdylib expose the C ABI for non-Rust hosts. The default net feature pulls in imap, native-tls and lettre; building --no-default-features yields a pure core with zero TLS/network deps that compiles in headless CI. The optional tauri feature adds the GUI plugin layer.

Verification

The crate carries 35 in-source unit tests across the engine and its modules: the command surface (version reporting, default-folder seeding, account add/list/remove, an import-then-filter flow, unknown-command error tagging), plus module-level tests in store, mime, search, filters, addressbook, util, gloda, junk, carddav, openpgp, smime and mailapps. Tests for the pure core run without network access and are intended to pass identically in a headless Linux CI; the net module's transport is feature-gated so the default test path needs no live mail server.