Skip to content

Repository files navigation

SpecterLang

SpecterLang is an experimental, statically typed scripting language for Windows. It includes an interpreter, JIT and AOT paths, an embeddable runtime, a command-line tool, a standard library, and English documentation.

The language supports classes, records, interfaces, generics, closures, pattern matching, discriminated unions, reflection, a permission model, and inline x64 assembly.

Project status

SpecterLang is research-grade software, not a production-ready language runtime. The implementation is Windows- and x64-focused, the public API is not stable, and some language/runtime combinations remain incomplete. Treat untrusted scripts as untrusted native code, especially when permissions, FFI, JIT, AOT, reflection, or inline assembly are enabled.

Requirements

  • Windows 10 or later on x64
  • Visual Studio 2022 with the Desktop development with C++ workload
  • MSVC v143 and a Windows 10 or 11 SDK

No third-party runtime dependencies are required by the solution.

Build

Run from a Visual Studio Developer PowerShell:

msbuild SpecterLang.sln /m /p:Configuration=Release /p:Platform=x64

The CLI is produced at x64/Release/spl.cli.exe.

Run

./x64/Release/spl.cli.exe run ./examples/hello.spl

Useful commands include check, lint, fmt, docs, profile, coverage, test, aot-save, aot-load, repl, lsp, and dap. Run the executable without arguments to print the complete command reference.

Releases

A successful CI run for the current main commit publishes or repairs a GitHub Release. Pull requests never publish, and release jobs are serialized. A superseded run may finish successfully without publishing. Before creating a new tag, the job checks that its tested commit is still main. If main advances immediately after that check, the release can still finish for the previously tested commit.

Release tags use v<major>.<minor>. The first release is v0.1; subsequent releases advance through v0.9, v1.0, v1.1, and the same decimal sequence thereafter. Published GitHub Releases must form that contiguous sequence, and each matching Git tag identifies the released source commit. An unfinished tag reserved by this workflow can be reclaimed by the next current main run.

Each release contains the exact Windows x64 archive built and exercised by that CI run plus its SHA-256 checksum. The archive includes the CLI, embedding example, DLL, static and import libraries, public headers, standard library, examples, documentation, license, security policy, and contribution guide.

The CLI and embedding example do not require the dynamic MSVC runtime. Applications that load the packaged DLL need a compatible Microsoft Visual C++ Redistributable.

Verify

./x64/Release/spl.cli.exe check ./examples/hello.spl --json
./x64/Release/spl.cli.exe run ./examples/hello.spl
./x64/Release/spl.cli.exe test ./tests --verbose
./x64/Release/spl.cli.exe test ./examples --verbose

The tests directory contains release invariants, including a denied-permission case. The examples directory also contains historical regression cases. Some files intentionally exercise failure paths; the test command owns their expected outcomes.

tools/sweep_aot_jit.ps1 is a broader diagnostic sweep. It returns a failure when an interpreter result, AOT result, or the dedicated JIT check fails. The current development tree still has unsupported or divergent AOT cases, so this command is intentionally stricter than the supported CI smoke matrix and is not expected to be green yet.

Known limitations

  • The permission manifest and [Sandbox] attribute are not an isolation boundary. Runtime permission introspection and enforcement remain incomplete.
  • The complete AOT path does not yet support every feature accepted by the interpreter. Some combinations fail or produce different output.
  • The implementation and build are Windows x64 specific.
  • The public embedding API and serialized AOT format are not stable.

Documentation

Contributing

See CONTRIBUTING.md. New work should include a concrete reproduction or example and an adversarial check that fails when the implementation is deliberately broken.

Security

See SECURITY.md. SpecterLang is experimental and should not be used as a security boundary.

License

SpecterLang is available under the MIT License.

About

No description, website, or topics provided.

Resources

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages