Skip to content

feat: add C# and optimized .NET compilation backends - #8

Merged
pchalamet merged 134 commits into
mainfrom
features/dotnet-backend
Oct 25, 2026
Merged

pchalamet merged 134 commits into
mainfrom
features/dotnet-backend

Conversation

@pchalamet

Copy link
Copy Markdown
Contributor

FScript can now compile programs into an independently buildable C# project or an optimized .NET assembly, without running an interpreter or ScriptHost in the generated program.

Both backends consume validated typed HIR/LIR and support existing FFI providers, external types, callbacks, and tasks. The .NET assembly path adds static-call and partial-application reduction, self-tail-call loops, typed collection callbacks, and pruning of unused generated members and dependencies. Optional typed FFI mappings enable direct CLR calls and dependency trimming.

The CLI supports --target csharp and --target dotnet. The .NET target also supports self-contained single-file and Native AOT executables with an explicit --runtime <rid>. Includes compiler API documentation, CLI guides, website updates, and semantic/FFI conformance coverage.

Validation:

  • make build — zero warnings.
  • make test — all suites pass, including standalone and Native AOT execution.
  • make smoke-tests.
  • Website production build and documentation version checks.
  • make verify-changelog.

@pchalamet
pchalamet merged commit 960e3fa into main Oct 25, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant