Refer to the crate level documentation to learn more.
Example usage:
use ;
generate!;
;
// Dynamically linked modules will use `my_javy_plugin_v1` as the import
// namespace.
javy_plugin!;
export!;
Migration for v2.0.0
Please read the extending Javy documentation for the new plugin API details.
To update your plugin:
- Create a directory named
wit
adjacent to theCargo.toml
file - Inside that
wit
directory, create a WIT file matching the details in the extending Javy documentation - Create a
config() -> Config
function that will return a Javy config - Create a
modify_runtime(runtime: Runtime) -> Runtime
function that will perform whatever modifications toruntime
that are necessary - Add a dependency on
wit-bindgen
to your crate - Use
wit_bindgen::generate!
to create the required traits from the WIT file - Create a struct type
- Remove
import_namespace!
and usejavy_plugin!
instead. Ensure you use a different value for theimport_namespace
parameter since the API has changed. Pass your struct type, yourconfig
function, and yourmodify_runtime
function. - Call
export!
on your struct type.
Publishing to crates.io
To publish this crate to crates.io, run ./publish.sh
.