Traditional CMS plugins run in-process with direct SQL credentials and unrestricted filesystem access. OpenDash executes every plugin inside an isolated --plugin-worker child process communicating over binary IPC, so extension faults or infinite loops cannot crash the web server or bypass permission grants.
Subprocess Worker Architecture & StagedCommitGuard
Workers hold no SqlitePool handle. When the host invokes a hook, filter, action, cron job, or custom route, the worker exchanges length-prefixed binary IPC frames (\x00ODIPC2\x00 banner + u32 LE UTF-8 JSON payloads up to 2 MiB). Every read operation runs on the Host under HostPolicy permission checks, and writes are buffered until the invocation succeeds and committed atomically by StagedCommitGuard inside one guarded BEGIN IMMEDIATE SQLite transaction.
Two Runtimes: Boa JS (ES2024) vs Wasmi WebAssembly
| Dimension | Boa JS (plugin.js) | Wasmi WebAssembly (plugin.wasm) |
|---|---|---|
| Engine & Pin | boa_engine = "=0.22.0" (pure Rust ES2024 JS) | wasmi = "=2.0.0" (wasm32-unknown-unknown) |
| Build Step | Zero-build plain JavaScript | Compiled binary via Rust (opendash-plugin-sdk) or AssemblyScript (@opendash/sdk/as/opendash) |
| Guest API / ABI | Clean-room globalThis.od.* (od.on, od.kv, od.content, od.http, etc.) | opendash_run() -> i32 export + opendash_v1 imports (v1.1 host_last_resp_len / host_read_last_resp) |
| Minimum Schema | Requires manifest_schema >= 3 | Supports manifest_schema 1..=4 |
| Execution Quota | Up to 5,000,000 loop iterations, recursion 128, stack 512 | Up to 20,000,000 Wasmi fuel & 16 MiB Wasm linear memory |
Enforced Runtime Quotas & OS Memory Caps
| Resource | Enforced Limit | Host Control Mechanism |
|---|---|---|
| OS Worker Memory Cap | 128 MiB max worker RSS/address space | Windows Job Object / Linux RLIMIT_AS / macOS Jetsam |
| Host Ops & HTTP | 100 host calls/run (64 in public GET); 10 HTTP calls (2s timeout, 1 MiB stream) | MAX_HOST_CALLS & SSRF DNS-pinning egress guard |
| Execution Deadlines | 5s standard/POST; 2s sync save/contact filters; 1s RouteGet; 200ms–1000ms render | Tokio invocation timer & worker watchdog |
| KV & Staged Batch | 256 B keys, 512 KiB values; max 64 staged KV ops / 2 MiB | Owner-isolated plugin_kv & single-tx commit |
| Worker Pool & Async | 4 Admin + 2 Background + 4 Public = 10 workers; queue 64 jobs, dispatch_depth < 2 | Independent semaphores & AsyncHookQueue |
Package Formats, Ceilings & Data Preservation
Plugins support manifest_schema 1..=4 via folder (plugins/<slug>/) or ZIP upload. Both CLI verification (--check-plugin) and installation perform strictly static checks (wasmi::Module::new bytecode validation or boa_engine syntax parsing without top-level execution):
- Archive Bounds: Max 5 MiB ZIP, 10 MiB uncompressed total (100:1 max ratio), 104 regular files, directory depth
<= 4,manifest.json <= 64 KiB, entrypoint<= 2 MiB, up to32custom blocks, and32gettext files (.pot/.po/.mo). - Public Assets (Schema 4): Opt-in files under
assets/declared inpublic_assetsare served at/plugins/<folder-slug>/assets/...only while the plugin is enabled.
Next Steps
- Build and unit-test a plugin locally in Create, Test & Package Your First Plugin.
- Configure hooks, custom routes, cron jobs, and
SecretStorein Permissions, Hooks, Custom Routes, Admin UI & SecretStore.