@askpext/runtime
v0.2.0
Published
The JavaScript runtime adapter for the Extro browser extension framework.
Readme
@askpext/runtime
The official JavaScript runtime adapter for the Extro browser extension framework.
Extro is a Rust-first framework where domain logic lives in Rust (WASM) and JavaScript acts as a thin, reactive adapter for browser APIs and UI.
Installation
npm install @askpext/runtimeUsage
Combined with the extro CLI, use the runtime to initialize your background or content scripts:
import { createEngine } from '@askpext/runtime';
import * as wasm from './pkg/extro_wasm.js'; // Generated by extro build
// Initialize the reactive engine
const engine = await createEngine(() => wasm);
// Dispatch a command to the Rust core
const result = await engine.dispatch({
surface: 'Background',
action: 'SyncState',
snapshot: { url: '...', title: '...' }
});
console.log(result.message);Features
- WASM Interop: Seamless bridging between JS and the Extro Rust core.
- Structured Logging: Built-in developer-friendly logging.
- Agent-Ready: Standardized execution patterns that AI agents can easily hook into.
License
MIT
