SmolScript 0.0.2
dotnet add package SmolScript --version 0.0.2
NuGet\Install-Package SmolScript -Version 0.0.2
<PackageReference Include="SmolScript" Version="0.0.2" />
paket add SmolScript --version 0.0.2
#r "nuget: SmolScript, 0.0.2"
// Install SmolScript as a Cake Addin #addin nuget:?package=SmolScript&version=0.0.2 // Install SmolScript as a Cake Tool #tool nuget:?package=SmolScript&version=0.0.2
SmolScript is a tiny embedded runtime for a slightly JS-like language. It features a compiler and a really basic vm and can run basic JS-style scripts.
Use it like this:
var vm = SmolVM.Compile("function addOne(num) { return num + 1; } var a = addOne(2);");
vm.Run();
var evaluatedResult = vm.GetGlobalVar<double>("a"); // this will be 3.0
The code in the vm has zero access to the .net host, but you can pass in functions that the script can call, and also .net can call functions in your script. In this way, Smol can be a nice embedded language for running untrusted code to extend applications.
Please note that SmolScript is written as a learning project and is not production ready, use at your own risk.
MIT licensed.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net6.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.