Skip to content

bymehul/VnSharp

Repository files navigation

VnSharp

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.

Status

VnSharp is not done.

What exists today:

  • .vnsx parser 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:
    • Core
    • OS
    • Text
    • Path
    • IO
    • Math
    • Time
    • Json
    • Debug
  • 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

Current Scope

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

Repository Layout

  • src/VnSharp.Language - parser, semantics, runtime, packaging, stdlib
  • src/VnSharp.Language.Tool - CLI entry point
  • tests/VnSharp.Language.Tests - regression test suite
  • demo/ - feature-by-feature walkthrough and runnable demo package
  • samples/ - older sample package layout still used by some tests/examples
  • vnsharp.package.json - root sample package manifest

Build

dotnet build VnSharp.slnx

Run Tests

dotnet run --project tests/VnSharp.Language.Tests

Run The Root Sample Package

dotnet run --project src/VnSharp.Language.Tool -- --run

Run The Demo Package

Static check:

dotnet run --project src/VnSharp.Language.Tool -- demo/package/vnsharp.package.json

Static check and execute:

dotnet run --project src/VnSharp.Language.Tool -- demo/package/vnsharp.package.json --run

Run A Single File

dotnet run --project src/VnSharp.Language.Tool -- demo/single-file/basics.vnsx --run

CLI Surface

The CLI is intentionally small right now.

Supported inputs:

  • one optional path argument
  • one optional --run flag

There are no subcommands such as install, publish, list, or help yet.

Documentation Map

Start here:

Then use these focused references:

Contributing

Contribution guidelines live in CONTRIBUTING.md.

License

This repository is licensed under the MIT License. See LICENSE.

About

A small, strict scripting language with packages, diagnostics, and an interpreter, built in C# for focused scripting workflows.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages