ZEMAIL-CORE // EMBEDDABLE MAIL ENGINE

// pure-Rust accounts · IMAP/SMTP · MIME · store · search · filters — the core behind zemail, embeddable in any host

Engineering Report Source

zemail-core is the embeddable engine behind zemail, a Thunderbird-style mail client. It owns the account model, IMAP/SMTP transport, MIME parsing, a local message store, search, filters and an address book — and exposes all of them through one command surface (Engine::invoke), so every host drives identical behaviour. It carries no GUI and no platform UI deps, so the standalone app and every embed (zemail, traderview, and other MenkeTechnologies apps) share the exact same code. The crate builds as rlib for native Rust/Tauri hosts and as staticlib/cdylib for non-Rust hosts over a C ABI. This project is in active development.

Embeddable

One command surface — Engine::invoke(cmd, args_json) — drives every host identically: native Rust, a Tauri plugin, or a C/C++ host over the FFI (zml_invoke).

Pure Rust

Foundational, vendorable deps only — serde, mail-parser, imap, lettre. No system mail stack, no copyleft, no native UI toolkit.

Feature-Gated Net

The net feature carries IMAP/SMTP over one native-tls stack. Build --no-default-features for a pure, network-free core that compiles in headless CI with zero TLS deps.

Honest Status

Engine commands, FFI exports and tests are derived from source. Current state: what exists is implemented and tested; the rest is on the roadmap, not faked.

Quick start

use zemail_core::Engine;
use serde_json::json;

let mut engine = Engine::new()?;

// One dotted command surface for every host.
let info = engine.invoke('version', &json!({}))?;
let folders = engine.invoke('folder.list', &json!({}))?;

// Import a message, then run filters over the folder.
engine.invoke('import.eml', &json!({ 'path': 'msg.eml' }))?;
engine.invoke('filter.run', &json!({ 'folder': 'Imported' }))?;

Surfaces

Depend on the rlib and call Engine directly, or go through Engine::invoke with JSON for parity across hosts. Enable the tauri feature to mount the engine as a Tauri v2 plugin. Link the staticlib/cdylib and call zml_invoke from a C ABI host. Asynchronous facts (sync progress, received mail) are pushed to the host through an installed event sink.

Where it goes next

See the engineering report for the module map, dependency footprint, FFI surface and test status, and the MenkeTechnologiesMeta umbrella for the wider stack this engine plugs into.