docs.rs failed to build plugins-rs-0.1.2
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
PluginSystem
Cargo.toml
= { = "0.1.2" }
Features
- Embeded Plugins
- Simple Standalone Plugins
- Archived Plugins with
.7z,.zip,.tar,.tar.gz,.tar.xz
Not Supported yet
- packages like
npm,jsr,git(comming soon)
main.rs
use bind_dir;
use ;
Static Plugins
javascript/static/{myplugin}/plugin.json
javascript/static/{myplugin}/index.ts
// your Plugin Logic
globalThis.Plugins.registerPlugin("base", {
name: "Base Test Plugin",
exec: function () {
return Date.now();
},
demo: CustomApi,
do_action
});
Embeded Plugins
to register plugins or custom api entry.ts as entry required
example 1: javascript/embed/{myplugin}/entry.ts
// your Plugin Logic
globalThis.Plugins.registerPlugin("base", {
name: "Base Test Plugin",
exec: function () {
return Date.now();
},
demo: CustomApi,
do_action
});
example 2: javascript/embed/{myplugin}/entry.ts
declare global {
var CustomApi: {
title: string;
}
}
globalThis.CustomApi = {
title : "DemoProperty"
};