@openmini/runtime
v0.1.3
Published
OpenMini mini-app runtime: typed bridge client, lifecycle, and the mini.* API
Maintainers
Readme
@openmini/runtime
The mini-app side of OpenMini: a typed, zero-dependency client for the bridge a host embeds you in.
npm install @openmini/runtimeimport { mini } from "@openmini/runtime";
await mini.storage.set("greeting", "hi");
await mini.ui.showToast({ message: "saved" });
const info = await mini.system.getInfo();
const data = await mini.host.invoke("getCart", { userId: "u1" }); // host-defined- Full surface: bridge API reference
- Wire protocol (source of truth): specs/bridge-protocol.md
- Errors are typed: every rejection is a
BridgeErrorwith a closedcodeenum.
Apps created with mini create (@openmini/cli) come wired
already. For tests or custom bindings, createMiniRuntime({ transport })
builds an instance over any message channel.
