module plugin; import wit.pumpkin.plugin.plugin; import wit.common; import pumpkin.register; struct MyPlugin { @GetMetadata PluginMetadata getMetadata() { immutable(WitString)[$] authors = [ "You".witList ]; return (immutable PluginMetadata( name: "pumpkin-plugin-example".witList, version_: "0.1.0".witList, authors: authors.witList, description: "An example plugin in D.".witList, dependencies: WitList!WitString(), permissions: WitList!WitString() )).witClone; } @OnLoad Result!(void, WitString) onLoad(Context ctx) { scope (exit) ctx.witDrop; // incoming resources need to be cleaned up after they are done being used log(Level.info, "Hello from D!".witList); return ok!WitString; } } mixin RegisterPlugin!MyPlugin;