Skip to content

Repository files navigation

MenSharp Compiler (M#)

The world's fastest C# compiler, compiling C# into Udon Assembly

Discord

日本語版はこちら

What is MenSharp (M#)?

M# is a compiler from C# to Udon Assembly, and at the same time it is currently (2026/09/09 13:00) the fastest C# compiler.

It runs up to 11 times faster than Roslyn, the official C# compiler. Note that it does not have a .NET backend at the moment.

This project makes use of AI, but it is NOT vibe coding.

If you send a PR, you are required to fully understand its contents before doing so.

See CONTRIBUTING.md for details.

Supported syntax

Almost all of C#'s syntax is supported.

The only things not supported right now are a small set of features such as Thread, lock, unsafe, file I/O, and network access that does not go through the VRC SDK.

public class Test : MenSharpBehaviour
{
    [UdonSynced]
    private int value;

    public async void Interact() {
        var list = new List<string> { "Hello", "world!" };

        // async/await and try/catch are supported too!
        string result;
        try {
            result = await AsyncFunction();
        } catch (Exception exception) {
            Debug.LogWarning($"{exception}");
            return;
        }

        list.Add(result);

        // LINQ is supported too!
        var linq = list.Select(value => value.ToLowerInvariant());

        foreach (var value in linq) {
            Debug.Log(value);
        }
    }
}

Documentation

./docs/doc.md

How fast is it?

Roughly 2 to 11 times faster than Roslyn.

About

A MenSharp compiler with better C# compatibility than UdonSharp.

Topics

Resources

Contributing

Stars

105 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages