Expand description
Plugin system for embedded WASM viewer plugins GLDF Plugin System
This module provides support for viewer plugins embedded in GLDF files.
Plugins are WASM modules stored in other/viewer/<plugin-type>/ directories
with a manifest.json describing their capabilities.
§Plugin Structure in GLDF
myfile.gldf (ZIP archive)
└── other/
└── viewer/
└── starsky/ # Plugin directory
├── manifest.json # Plugin metadata
├── plugin.js # WASM JS bindings
└── plugin_bg.wasm # WASM binary§Example
ⓘ
use gldf_rs::plugin::{PluginManager, PluginManifest};
let gldf = FileBufGldf::load("luminaire.gldf")?;
let plugins = PluginManager::discover_plugins(&gldf);
for plugin in plugins {
println!("Found plugin: {} ({})", plugin.manifest.name, plugin.manifest.plugin_type);
}Structs§
- Plugin
- A discovered plugin with its manifest and file contents.
- Plugin
Manager - Plugin discovery and management for GLDF files.
- Plugin
Manifest - Plugin manifest describing a viewer plugin embedded in a GLDF file.
- Storage
Keys - Storage keys for plugins that need multiple data files