ZGO-CORE // EMBEDDABLE LAUNCHER ENGINE

// pure-Rust workflows · script filters · matching · tokens · web search · clipboard · snippets — the core behind zgo, embeddable in any host

Engineering Report Source

zgo-core is the embeddable engine behind zgo, an Alfred-style launcher. It owns the authoring model (workflows, objects + connections, variables), the Script Filter feedback model (JSON + legacy XML), fuzzy matching, token expansion, web searches, clipboard history and snippets — 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 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; current Alfred coverage is 87.5% (weighted) of an enumerated feature set.

Embeddable

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

Pure Rust

Foundational, vendorable deps only — serde, serde_json, thiserror, dirs. No embedded JS engine, no copyleft, no native UI toolkit.

Feature-Gated Exec

The exec feature carries Script Filter / Run Script process spawning. Build --no-default-features for a feedback-only core that compiles in headless CI with no spawn surface; serialization, parsing and matching still work.

Honest Status

Engine commands, FFI exports and tests are derived from source. The macOS launcher shell (global hotkey, result window) lives in the host, not the engine — and the port report says so.

Quick start

use zgo_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 searches = engine.invoke("websearch.list", &json!({}))?;

// Parse a Script Filter's output, then filter it by a query.
let fb = engine.invoke("feedback.parse", &json!({ "text": script_stdout }))?;
let url = engine.invoke("websearch.url", &json!({ "keyword": "ddg", "query": "rust" }))?;

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 Tauri app commands (zgo_invoke + setup), with events emitted on zgo-event. Link the staticlib/cdylib and call zgo_invoke from a C ABI host. Asynchronous facts (a Script Filter started / finished, errors) 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, the port report for feature-by-feature Alfred coverage, and the MenkeTechnologiesMeta umbrella for the wider stack this engine plugs into.