Plugin SDK Architecture and ABI Concept
Overview
As part of Phase 2 (Real Plugin SDK), Octanium introduces the capability for third-party developers to create and distribute standalone applications. These applications, referred to as "plugins," integrate seamlessly with the shell and host environments without modifying the core system repository.
Plugin Types
- Frontend-Only Plugins (Web Apps): Primarily built using web technologies (HTML, CSS, JS) and executed within a webview wrapper, communicating with the system via a limited IPC subset.
- Native Plugins (WASM / ABI): High-performance plugins compiled to WebAssembly (WASM) or a stable binary interface, allowing deeper integration and system-level operations via the Rust core.
Plugin Manifest
Every plugin must include a manifest.json describing its metadata, permissions, and entry points.
{
"id": "com.developer.myapp",
"name": "My App",
"version": "1.0.0",
"description": "An example plugin application.",
"entrypoint": "index.html", // or "plugin.wasm"
"icon": "icon.png",
"permissions": [
"fs:read:workspace",
"notifications:show"
]
}
Storage and Loading
Plugins will be stored in a dedicated directory: ~/.octanium/plugins/.
The system will:
- Scan this directory on startup.
- Read the
manifest.jsonof each subfolder. - Register the valid plugins in the
AppRegistry. - Expose the list to the Launcher and Taskbar.
IPC Interface and ABI
The core system (Tauri Rust backend) exposes a standardized API for plugins.
Communication Channel
Plugins communicate with the host via an event-bus or direct invoke mechanism, wrapped in a developer SDK.
Standard APIs
os.fs.read(path): Bounded filesystem read.os.window.spawn(config): Create a new window instance.os.notifications.send(title, body): Trigger a system notification.os.state.get(key): Access shared plugin state.
Security and Isolation
- Plugins are strictly sandboxed.
- Filesystem access is limited to the workspace and the plugin's own data folder.
- Processes cannot be spawned arbitrarily; they must be declared in permissions and routed through
os.process.spawn.
Next Steps for Implementation
- Registry Update: Modify
src-tauri/src/core/registry.rsto load dynamically from the~/.octanium/plugins/directory. - SDK Repository: Create a separate TypeScript package
octanium-sdkfor frontend developers. - WASM Host (Optional): Evaluate
wasmtimefor executing native plugins safely in the Rust backend.