zula-core-3.0.0 has been yanked.
zula-core is the core module of the zula shell.
zula-core contains the core functionality of the zula shell, and is required for writing
plugins. This api is experimental, and may introduce breaking changes.
Plugin Guide
To create a plugin, first initialize a library crate.
Set the crate type to cdylib, and add zula-core as a dependency.
[]
= ["cdylib"]
[]
= "3.0.0"
Import the [Plugin] trait and implement it on your plugin type.
use zula-;
;
Run cargo build --release to build your plugin. The library file should be in target/release/lib<name>.so. This is the file that you'll put in your plugins folder.
Thats it! Run zula cfg inside zula to check that its loaded, and run plugin.<name> to use it. Due to weird ownership relationships, call has to take a raw pointer, so use it responsibly.