A minimal source-compiled F# plugin for the Hosihikari framework. The F# loader compiles
main.fsx at load with FSharp.Compiler.Service and runs the assembly in a collectible ALC; there is
no build step for the author.
-
Copy this repository into your server as
plugins/MyFSharpPlugin/. -
Rename the plugin: change
manifest.jsonname, renameMyFSharpPlugin.conf, and rename the type inmain.fsx. The package directory name must equal the manifestname. -
Install the shim variant for the server and the F# loader:
lip install github.com/HosihikariFramework/HostingShim#levilamina # or #endstone lip install github.com/HosihikariFramework/FSharpLoader
-
Restart the server. The log shows the plugin loading and enabling.
For the self-hosted Linux carrier, install the suffix-less shim package and start the server through
hosihikari-server; loaders and plugins still live under plugins/.
manifest.json—loader: fsharp, depends onhosihikariandhosihikari-fsharp.main.fsx— a parameterless type implementingIPlugin. It loadshelper.fsxwith#load.helper.fsx— the second compilation unit, loaded into the entry script.MyFSharpPlugin.conf— package defaults.
- Package defaults:
plugins/<name>/<name>.conf. - Server override:
config/hosihikari/<name>.conf. - Environment variables override the same keys.
- Runtime data:
data/hosihikari/<name>/.
OnLoad runs after dependencies are ready. OnEnable opens the event/timer gate; a refusal keeps
the plugin loaded and disabled. OnUnload releases what the plugin owns. An exception from a hook
is a fault and the host unloads the plugin.
See the F# loader for the compilation details.
MIT-0, see LICENSE.md.