VnSharp is a small C#-implemented scripting language, package system, and interpreter.
The project started from a simple requirement: I needed a language that was easy to write and read, but strict enough to catch mistakes early, so higher-level libraries could be built on top of it and used as scripting layers.
This project is not intended to become a full general-purpose language. It is intended to stay a focused scripting language and the runtime/package/tooling around it.
VnSharp is not done.
What exists today:
.vnsxparser and lexer- semantic analysis with source-mapped diagnostics
- package manifests and recursive dependency loading
- bound runtime/interpreter
- async/await support for host-driven workflows
- runtime session API for long-lived embedding, detached-task draining, and cancellation
- default standard libraries:
CoreOSTextPathIOMathTimeJsonDebug
- runnable demo package and single-file examples
- regression tests
What is not built yet:
- package install/publish workflow
- richer operator/type surface beyond the current core
- full resumable async runtime model beyond the current host-driven implementation
- serialized suspended execution/save-load for async state
The repo currently focuses on the language platform itself:
- syntax and parsing
- semantic rules
- runtime execution
- embeddable runtime sessions
- package graph loading
- host standard libraries
src/VnSharp.Language- parser, semantics, runtime, packaging, stdlibsrc/VnSharp.Language.Tool- CLI entry pointtests/VnSharp.Language.Tests- regression test suitedemo/- feature-by-feature walkthrough and runnable demo packagesamples/- older sample package layout still used by some tests/examplesvnsharp.package.json- root sample package manifest
dotnet build VnSharp.slnxdotnet run --project tests/VnSharp.Language.Testsdotnet run --project src/VnSharp.Language.Tool -- --runStatic check:
dotnet run --project src/VnSharp.Language.Tool -- demo/package/vnsharp.package.jsonStatic check and execute:
dotnet run --project src/VnSharp.Language.Tool -- demo/package/vnsharp.package.json --rundotnet run --project src/VnSharp.Language.Tool -- demo/single-file/basics.vnsx --runThe CLI is intentionally small right now.
Supported inputs:
- one optional path argument
- one optional
--runflag
There are no subcommands such as install, publish, list, or help yet.
Start here:
Then use these focused references:
- demo/commands.md
- demo/language-features.md
- demo/syntaxkind-reference.md
- demo/semantic-rules.md
- demo/runtime-and-diagnostics.md
- demo/package-and-files.md
- demo/stdlib.md
- docs/async-constraints.md
Contribution guidelines live in CONTRIBUTING.md.
This repository is licensed under the MIT License. See LICENSE.