Plugin SDK Overview
Khadim plugins let you add new tools to the app without changing the core runtime. A plugin is packaged as a WebAssembly module plus a plugin.toml manifest that describes metadata, config, permissions, and optional desktop UI tabs.
What a plugin contains
Section titled “What a plugin contains”plugin.tomlfor metadata, configuration fields, and permission declarations.plugin.wasmfor the compiled plugin code.- Optional
ui.jsand[[ui.tabs]]manifest entries for desktop plugin panels. - Optional source files and build scripts used to produce the final WebAssembly bundle.
What plugins can do
Section titled “What plugins can do”- Register one or more tools that the host can call.
- Read plugin config values provided by the app.
- Use host capabilities such as HTTP or filesystem access when permissions allow it.
- Add desktop sidebar/content tabs by registering custom elements from a plugin UI bundle.
- Stay isolated from the main application process behind a narrow host API.
Plugin author workflow
Section titled “Plugin author workflow”- Start from one of the example plugins in
examples/plugins/. - Edit
plugin.tomlto define the plugin identity and permissions. - Implement your tool behavior in AssemblyScript or Rust.
- Build
plugin.wasm. - Install or copy the plugin into the Khadim plugins directory.
Docs map
Section titled “Docs map”- Start with Getting Started to build your first plugin.
- Review the Manifest Reference to understand
plugin.toml. - Learn the AssemblyScript SDK for TypeScript-style plugins.
- Check Host Capabilities before requesting permissions.
- Browse Examples for working plugin templates.