V# is the non-object-oriented subset of C# 13, compiled to standard JVM class files.
You write C# — the literals, the patterns, the interpolation, the tuples,
async/await — and you get ordinary bytecode that any Java
program can call, any JVM can run, and javap can read. There is no runtime bridge,
no shim layer, and no reimplementation of the JDK: java.util.ArrayList is
the list you use.
The compiler itself is written in pure Java 25 against the JDK only. No ASM, no ANTLR, no
Jackson, no JUnit. Bytecode is emitted with java.lang.classfile, the parser is
hand-written, and the test harness is in the repository. The dependency list is empty, and it is
meant to stay that way.
V# source → lexer → parser → AST → semantic analysis → typed IR → lowering → JVM bytecode
Principal characteristics
-
C# 13 semantics. String interpolation with alignment and
D,XandFspecifiers, switch expressions with type and property patterns,record structwithwithexpressions and structural equality, ranges, slices and list patterns, generics, extension methods andparams. -
Standard JVM output. Compilation produces ordinary
.classfiles. Top-level statements become apublic static void main(String[])on a class named after the file, and the result is callable from Java and readable withjavap. -
Direct JDK integration. Import a package and call it in V# spelling.
Generics cross the boundary and the whole default module image is nameable —
java.sql,java.net.http,java.util.logging— with no configuration. -
async/awaiton virtual threads.Task<T>isjava.util.concurrent.Future<T>, not a lookalike. -
No object model. User classes with instance state, inheritance,
virtual/overrideand declared interfaces are excluded by design, not pending. See what is deliberately not here. - Deterministic builds. Two compilations of the same sources produce byte-identical artifacts.
Sixty seconds
The requirements are a JDK 25 and Gradle 9.x. That is the whole list.
gradle installTools # builds the compiler and prints the PATH line for your shell
export PATH="$PWD/vsharp-cli/build/install/vsharp/bin:$PATH"
vsharp --version # V# 0.0.93-A (surface 4)
Write Hello.vs:
using System;
static int Fib(int n)
{
return n < 2 ? n : Fib(n - 1) + Fib(n - 2);
}
Console.WriteLine($"fib(10) = {Fib(10)}");
Compile and run it:
vsharp --out out Hello.vs
java -cp out:vsharp-runtime/build/libs/vsharp-runtime-0.0.93-A.jar Hello
# fib(10) = 55
The full procedure, including what to do when the JVM on your PATH is older than
25, is on the Getting Started page.
Where to go next
Learning the language
- About V# — purpose, design rules and scope
- Examples — compiler-executed snippets
- Documentation — the reference material
Working on V#
- Development — building and testing
- Issue tracker
- Resources — platforms, status and licence
Project status
V# is at version 0.0.93-A and is built from source; there are no tagged releases
yet. The build is its own acceptance gate: gradle build compiles the compiler, runs
all 865 test cases, then compiles samples/hello with the produced CLI, runs the
emitted class on a real JVM and asserts its output. The suite is executed end-to-end on Linux;
the project describes its other hosts as supported by construction rather than by assumption.
See platform support for the details.
