This issue describes some of the requirements that the plugin system needs support, the plugins themself will be WASM modules and a manifest describing the plugin.
Plugins
The plugins would have two main components: WASM module (compiled code) and manifest (json, yaml, ...) (zipped an archive):
Defaults: no permissions, no events, no file system access, no internet access, it can only crunch numbers (that is also limited).
A manifest: Describes the plugin and the permissions it wants and the events it wants to listen to and generate, etc
Language Agnostic: Allow Multi-Language source C, C++, Rust to be compiled to WebAssembly
Stateful: modules can request to be stateful in the manifest and the max size of the state (on disk).
Sandboxed: It should not know about other plugins, only through events emitted by the plugin manager.
Plugin Manager
Event Driven: Plugins are invoked by an event that the app specifies (e.g. Task Create, Task Modified, Task Delete, Task Sync, Interval Timer, etc).
Smart loading and unloading of modules: modules that are not used often get unloaded to reduce memory usage.
Plugin Isolation: Must verify WebAssembly module do not escape the sandbox.
Must kill modules that are malicious (while (true) {}, out of memory, trying to access internet without specifying, etc) and unload module and mark as malicious, report to user.
The main goal for the safety measures is to allow a user to load a plugin that is not necessarily created by @stride-tasks and be sure that it will not maliciously crash the application or try to delete all the tasks (unless you give it permission).
Templates
An official template for plugins should be created maybe stride-tasks/plugin-template-rust that allows users to quickly get started with plugin development for stride.
This issue describes some of the requirements that the plugin system needs support, the plugins themself will be WASM modules and a manifest describing the plugin.
Plugins
The plugins would have two main components: WASM module (compiled code) and manifest (json, yaml, ...) (zipped an archive):
Plugin Manager
The main goal for the safety measures is to allow a user to load a plugin that is not necessarily created by @stride-tasks and be sure that it will not maliciously crash the application or try to delete all the tasks (unless you give it permission).
Templates
An official template for plugins should be created maybe
stride-tasks/plugin-template-rust
that allows users to quickly get started with plugin development for stride.