Templates
Each template is a complete plugin package. Copy it into the server as plugins/<Name>/, then change
name in manifest.json and the matching .conf; the directory name must equal the manifest name.
The templates are MIT-0; Hosihikari.Plugin.Abstractions 1.0.0 and later are MIT.
Precompiled assembly
Section titled “Precompiled assembly”The plugin manager's built-in assembly loader loads a .NET class library. No loader package is needed.
dotnet new install Hosihikari.Plugin.Templatesdotnet new hosihikari-plugin -n MyPlugin # C## ordotnet new hosihikari-plugin-fsharp -n MyPlugin # F#Build and pack with Hosihikari.Plugin.Build; no framework checkout is needed:
cd MyPlugindotnet add package Hosihikari.Plugin.Build --version 1.0.0dotnet build -t:PackPluginThe target writes dist/MyPlugin/. Multi-target projects pass -f <tfm>. See
Testing plugins for the test package and the
template README.
Source C# and F#
Section titled “Source C# and F#”The C# and F# loaders compile the source at load; the package carries source and no build output.
| Template | Loader | Install |
|---|---|---|
| CSharpPluginTemplate | hosihikari-csharp |
lip install github.com/HosihikariFramework/CSharpLoader |
| FSharpPluginTemplate | hosihikari-fsharp |
lip install github.com/HosihikariFramework/FSharpLoader |
CSharpPluginTemplate demonstrates #:package and #:include; run its pack.ps1 or pack.sh,
then copy dist/MyCSharpPlugin/ into plugins/. FSharpPluginTemplate demonstrates #load; copy
the repository into plugins/MyFSharpPlugin/ directly. Rename the plugin and restart. See
C# plugins for the contract.
Out-of-process runtimes
Section titled “Out-of-process runtimes”RpcLoader starts the command from extraInfo.command and speaks JSON-RPC over stdio. Each
directory below is a complete package; the binding is copied from the loader and refreshed when
the loader is upgraded.
| Template | Runtime | Build |
|---|---|---|
| Node.js/TypeScript | Node.js 20+ | npm install && npm run build |
| Python | Python 3.8+ | none |
| Kotlin/JVM | JDK 21+ | ./build.sh (build.ps1 on Windows) |
Install RpcLoader and put the runtime executable on PATH, copy the directory into plugins/,
and restart. The Python manifest uses python3; change it to python on Windows. See
out-of-process plugins for the protocol and context.
Choosing a template
Section titled “Choosing a template”- Precompiled assembly: multi-file projects, NuGet dependencies, and code that ships as a DLL.
- C# or F# source: small plugins that the loader compiles at load, including multi-file C# with
#:includeand pack-time#:packagedependencies. - RPC: Node.js, Python, and Kotlin plugins, or work that should run outside the server process.
