Directory Layout
After creating a new plugin withnoorle plugin new my-plugin, you’ll have:
Required Files
plugin.wasm
The compiled WebAssembly module. This file:- Is generated during
noorle plugin build - Contains your plugin’s entire compiled implementation
- Must target WASI Preview 2
- Is included in the
.npackarchive when uploaded
Configuration Files
noorle.yaml
Metadata and configuration for your plugin. Must be in the root directory..env (Optional)
Environment variables available to your plugin at runtime.- Not included in version control (use
.env.example) - Values are encrypted at rest
- Only accessible within your plugin’s sandbox
- Set via CLI:
noorle env set KEY=value
.env.example (Recommended)
Template showing required environment variables without actual values.Source Files
Rust (src/)
Python
TypeScript
Interface Definition (world.wit)
Component Model interface defining your exported tools. Auto-generated but can be customized.- Tool names and signatures
- Parameter types and return types
- Used for introspection and discovery
Build Configuration
Cargo.toml (Rust)
crate-type = ["cdylib"]— Compile to WebAssembly component- Use
[profile.release]for optimization - Minimize dependencies to reduce WASM size
package.json (TypeScript)
pyproject.toml (Python)
File Inclusion Rules
When you runnoorle plugin build, the CLI:
-
Always includes:
plugin.wasm(compiled output)noorle.yaml(if present)
-
Optionally includes (if present):
world.wit.env(encrypted before inclusion)
-
Never includes:
src/directory (source code)Cargo.toml,package.json,pyproject.toml.git/,node_modules/,target/- Files in
.gitignore
.npack Archive Format
The final.npack file is a gzip-compressed tar archive:
Size Optimization
Keep your plugin small for faster uploads and execution:Minimize Dependencies
Enable Optimizations
Typical Sizes
- Simple plugin: 100KB - 500KB
- Medium plugin: 500KB - 2MB
- Complex plugin: 2MB - 5MB
Testing Your Plugin
Local Testing
Before uploading, test your plugin locally:Version Management
After uploading, previous versions are preserved:Next Steps
- Configure your plugin: Configuration Reference
- Learn about permissions: Permissions and Security
- Choose your language: Language Guides
- Deploy: Publishing and Versioning