meradomo-engine
The Rust SDK for embedding the Meradomo engine in your app — so your users get a public web address for their local app with one download, not two.
This crate is the open-source launcher/client: it discovers a running engine, spawns one from a bundled payload, attaches to a shared engine, and publishes your app — all over the engine's loopback HTTP protocol. The engine binary itself is a separate, pre-built download (see below).
[]
= "0.1"
Quick start
use ;
use Duration;
let req = ConnectRequest ;
let connected = connect?;
println!;
On the next launch, reuse the saved credential and call
spawn_or_attach — no browser. See the worked
example in examples/hello_meradomo.rs.
The engine bundle (closed, pre-built)
The engine binary (agent.mjs + a pinned Node runtime + the outbound client) is
the Meradomo product and ships as a versioned, checksummed download, indexed by
a public manifest:
https://stmeraqqemciyamqs2e.blob.core.windows.net/releases/engine-sdk/manifest.json
Fetch the manifest, download bundle.url, verify bundle.sha256, and drop the
sidecars/ + resources/ into your app's bundle (Tauri externalBin +
resources). The manifest also carries the wire protocol version — attach to an
incumbent engine only when its protocol matches [ENGINE_PROTOCOL].
Sharing it with other people
An app can hand its own users access, without sending them to a browser or asking them to install anything of Meradomo's:
use ;
// Everyone who can reach this computer, and the apps that can be shared.
let listed = people?;
for person in &listed.members
// Invite somebody, handing over one app in the same step. They get an email
// naming that app and its address, and it is reachable the moment they accept.
invite?;
// Withdraw one app, or remove them from the computer entirely.
revoke?;
Where the authority comes from. Not your process — the engine holds the
computer's credential and lends it to an app that has registered with it.
[register] collects that capability, so call it (or spawn_or_attach, which
does) before any of the above; the calls return [PeopleError::NotAttached]
otherwise. The capability is minted per engine run and lives only in memory,
so registering again after an engine restart is how you get a fresh one —
register is idempotent and safe to call before each request.
Every rule stays with Meradomo: what counts as an address, which apps may be
granted, and how often invitations may be sent. Its refusals arrive as
[PeopleError::Refused] carrying the exact message, which is written to be shown
to a person — so show it rather than replacing it with something of your own.
The three integration paths
- Detect the Meradomo app (no bundle) — the plain Agent API.
- Embed the engine, Model A — the user pays Meradomo; one download. This crate.
- Embed the engine, Model B — you pay Meradomo for usage; your users need no Meradomo account. Coming soon.
Full docs: https://developers.meradomo.com/guides/embedded-engine
License
MIT.