SquidStd.Scripting.Lua 0.10.0

dotnet add package SquidStd.Scripting.Lua --version 0.10.0
                    
NuGet\Install-Package SquidStd.Scripting.Lua -Version 0.10.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="SquidStd.Scripting.Lua" Version="0.10.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SquidStd.Scripting.Lua" Version="0.10.0" />
                    
Directory.Packages.props
<PackageReference Include="SquidStd.Scripting.Lua" />
                    
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 SquidStd.Scripting.Lua --version 0.10.0
                    
#r "nuget: SquidStd.Scripting.Lua, 0.10.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 SquidStd.Scripting.Lua@0.10.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=SquidStd.Scripting.Lua&version=0.10.0
                    
Install as a Cake Addin
#tool nuget:?package=SquidStd.Scripting.Lua&version=0.10.0
                    
Install as a Cake Tool

<h1 align="center">SquidStd.Scripting.Lua</h1>

Lua scripting for SquidStd. Hosts a Lua engine (IScriptEngineService) that exposes .NET methods to scripts through attribute-decorated modules, bridges events to the SquidStd event bus, ships built-in modules (logging, events, random), generates .luarc typings/docs, and supports init scripts, constants, and callbacks.

Install

dotnet add package SquidStd.Scripting.Lua

Usage

using DryIoc;
using SquidStd.Generators.Scripting.Lua;
using SquidStd.Scripting.Lua.Attributes;
using SquidStd.Scripting.Lua.Attributes.Scripts;
using SquidStd.Scripting.Lua.Extensions.Scripts;

[RegisterScriptModule]
[ScriptModule("math2")]
public sealed class MathModule
{
    [ScriptFunction("add")]
    public int Add(int a, int b) => a + b;
}

var container = new Container();
container.RegisterGeneratedScriptModules();
// Resolve IScriptEngineService to load and execute scripts that call math2.add(1, 2).

Key types

Type Purpose
IScriptEngineService Lua engine: load/run scripts, register modules/constants/callbacks.
ILuaEventBridge Bridges Lua scripts to the event bus.
ScriptModuleAttribute / ScriptFunctionAttribute Expose .NET classes/methods to Lua.
RegisterScriptModuleAttribute Marks script modules for generated registration.
AddScriptModuleExtension RegisterScriptModule<T>() / RegisterLuaUserData<T>().

License

MIT — part of SquidStd.

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
0.10.0 43 6/30/2026
0.9.0 65 6/29/2026
0.8.0 57 6/28/2026
0.7.0 67 6/26/2026
0.6.0 61 6/25/2026
0.5.1 71 6/25/2026
0.5.0 68 6/24/2026
0.4.0 64 6/23/2026
0.3.0 64 6/23/2026
0.2.0 68 6/22/2026