SharpMUSH.Library 1.0.0

dotnet add package SharpMUSH.Library --version 1.0.0
                    
NuGet\Install-Package SharpMUSH.Library -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SharpMUSH.Library" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SharpMUSH.Library" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="SharpMUSH.Library" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add SharpMUSH.Library --version 1.0.0
                    
#r "nuget: SharpMUSH.Library, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package SharpMUSH.Library@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=SharpMUSH.Library&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=SharpMUSH.Library&version=1.0.0
                    
Install as a Cake Tool

SharpMUSH.Library — Plugin Contract Package

This package is the contract surface external SharpMUSH plugins build against. A plugin in a separate repository adds a <PackageReference Include="SharpMUSH.Library" />, writes a [SharpPlugin] sealed class : PluginBase entry type, decorates static methods with [SharpCommand] / [SharpFunction], and ships the resulting DLL (plus a plugin.json) to a SharpMUSH server's plugin directory.

Interim packaging note. Today the whole SharpMUSH.Library assembly is shipped as the contract package rather than a slimmer SharpMUSH.Plugin.Abstractions. CommandDefinition / FunctionDefinition (required by PluginBase / ICommandSource / IFunctionSource) reference IMUSHCodeParser, which transitively pulls in most of SharpMUSH.Library (Services, Models, DiscriminatedUnions). Carving those out would relocate the bulk of the Library into the "abstractions" assembly and split the dynamic loader's shared-type set across two assemblies. Shipping the Library whole keeps a single shared contract assembly, which is exactly what the loader's PluginLoaderService.SharedContractTypes requires. See the TODO slim abstractions note in SharpMUSH.Library.csproj.

What's in the contract surface

Identity & lifecycle

  • IPlugin, PluginBase, [SharpPlugin] (SharpMUSH.Library.Attributes.SharpPluginAttribute)
  • PluginManifest, PluginContractVersion

Command / function contribution

  • [SharpCommand], [SharpFunction]
  • ICommandSource / IFunctionSource, CommandDefinition / FunctionDefinition
  • IMUSHCodeParser, CallState, Option<…> (the types command/function bodies use)

Phase 2a contribution surfaces

  • IServiceRegistrar, IMigrationSource, IFlagSource, IBridgeSubscriptionSource, PluginFlag

Phase 2b engine-extension hooks

  • ICommandInterceptor, IConnectionHook, IObjectLifecycleHook

Contract-version alignment

The package Version is aligned to PluginContractVersion.Current (currently 1.0.0). A managed package's binaries.min_server_version is checked against this value at load time, so a plugin built against a newer contract is refused by an older server rather than failing obscurely. When the plugin contract surface changes, bump both PluginContractVersion.Current and the package <Version> together.

How an external plugin references it

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>net10.0</TargetFramework>
    <Nullable>enable</Nullable>
    
    <EnableDynamicLoading>true</EnableDynamicLoading>
  </PropertyGroup>

  <ItemGroup>
    
    <PackageReference Include="SharpMUSH.Library" Version="1.0.0">
      <ExcludeAssets>runtime</ExcludeAssets>
    </PackageReference>

    
    <PackageReference Include="SharpMUSH.Implementation.Generated" Version="1.0.0"
                      PrivateAssets="all" />
  </ItemGroup>
</Project>
using SharpMUSH.Library.Attributes;
using SharpMUSH.Library.DiscriminatedUnions;
using SharpMUSH.Library.ParserInterfaces;
using SharpMUSH.Library.Plugins;

[SharpPlugin]
public sealed class MyPlugin : PluginBase
{
  public override string Id => "com.example.my-plugin";
  public override string Version => "1.0.0";
}

public static class MyCommands
{
  [SharpCommand(Name = "@HELLO")]
  public static ValueTask<Option<CallState>> Hello(IMUSHCodeParser parser, SharpCommandAttribute _2)
    => /* ... */;
}

Ship the built plugin DLL together with a plugin.json (id / version / dependencies / priority / min server version) into the server's plugin directory. See docs/guides/writing-a-plugin.md in the SharpMUSH repository for the full walkthrough.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 141 6/20/2026