Embeddable FScript language engine: parser, type inference, and evaluator.
$ dotnet add package MagnusOpera.FScript.LanguageFScript is a lightweight, embeddable interpreter with an F#/ML-style language.
It is designed for host applications that need:
let/fun, algebraic modeling.FScript currently includes:
let, let rec, and mutual recursion, lambdas,if/elif/else, match, for ... in ... do,typeof type tokens for host workflows.make buildmake testdotnet run --project src/FScript -- samples/types-showcase.fssOptional sandbox root override:
dotnet run --project src/FScript -- --root /tmp/sandbox samples/types-showcase.fssUseful samples:
samples/types-showcase.fsssamples/patterns-and-collections.fsssamples/tree.fsssamples/mutual-recursion.fssbrew tap magnusopera/tap
brew install fscriptMagnusOpera.FScript.LanguageMagnusOpera.FScript.RuntimeThe core engine lives in src/FScript.Language and runs in four stages:
Host integration lives in src/FScript.Runtime.
FScript is extended through host-provided externs.
Each extern declares:
Built-in extern families include List.*, Map.*, Option.*, Fs.*, Json.*, Xml.*, Regex.*, hashing, GUIDs, and print.
For details and extension workflow, see docs/external-functions.md.
FScript runs in-process. Security is capability-based:
Operational controls (timeouts, cancellation, resource limits, process/container isolation) are host responsibilities.
See docs/sandbox-and-security.md for the full model and checklist.
This project is licensed under the MIT License.
See LICENSE.