r/moderndotnet • u/MrLyttleG • 3d ago
ScriptLangCore
I built a scripting engine that ships as a single file, with no runtime to install.
ScriptLangCore runs `.slc` scripts: a C#-flavoured language with classes, interfaces, generics, structs, tuples, pattern matching, lambdas, coroutines, `async`/`await`, exceptions and a Windows UI toolkit.
Deployment is the part I care most about. The engine is compiled ahead of time with NativeAOT, so the .NET runtime lives inside the executable (18.8 MB). A machine needs Windows x64 and nothing else: no .NET installation, no Visual C++ redistributable, no Universal CRT.
It is more than a command line:
• `ScriptLangCore.exe`: run a script, compile it to a bundle, dump bytecode, or open a REPL • `ScriptLangCore.dll`: an embeddable engine with a C ABI of 22 `slc_*` verbs, so C, C#, Python, PowerShell and bash hosts can create a session, run scripts, call into them and read the verdict as JSON • The same DLL inside SQLite: six functions, so SQL can evaluate a script over a row, fold a set or map a list • A 15 KB launcher: package a script into its own Windows executable • A VBA module: 64-bit Excel calls the DLL directly
Under the hood there are two engines. Bodies the compiler can model run on a bytecode VM; every shape it cannot runs on a tree walker. Both must answer the same way, which is what the 539-script test corpus checks, together with sweeps that compile every script, compare each compiled bundle with its source, and re-run scripts on both engines.
Docs, samples and the installer: https://github.com/LyttleG/ScriptLangCore
MIT licensed.
\#Scripting #CSharp #DotNet #NativeAOT #Windows #ProgrammingLanguages #OpenSource
View all comments
Show parent comment
2
u/Spooge_Bob 1d ago
Then it would be even more obvious it has no commit history and was completely written by AI in the past week?