Skip to content
This repository has been archived by the owner on Jun 12, 2022. It is now read-only.
/ SharpX Public archive

An Extensible Experimental C# to X Transpiler & Compiler.

License

Notifications You must be signed in to change notification settings

mika-archived/SharpX

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

REPOSITORY ARCHIVED: Next-Gen -> natsuneko-laboratory/SharpX

SharpX

Extensible Experimental C# to X Transpiler.
SharpX compiler understands the code and compiles it according to the C# 9 language specification. However, how much language specification is supported depends on the compilation target (for example, ShaderLab does not support LINQ and async-await).

Motivation

C# has a flexible and strongly type system, high quality editor support, compiler platform system, and its ecosystem. This makes programming in C# a fairly pleasant experience. Therefore, I thought that if I could convert from C# to other relatively low-level languages, such as HLSL, GLSL, or Assemblies, my productivity in those areas would be greatly improved. Originally, it was a tool for writing ShaderLab in C#, but I thought it could be applied to other languages with some flexibility in the plugin system. SharpX was born as a result.

VS other similar tools

There are several implementations of the C# to X transpiler that I can see. Some of the advantages over them include:

  • Roslyn based - You can use the latest C# language specifications
  • Extendable - This allows you to compile to any language

However, there are some disadvantages as well:

  • Unoptimized - Not specializing in a particular language, mysterious syntax may be required
  • Portability - Portability to different languages is low because each specific language requires different requirements

Available Backend Languages

  • ShaderLab (HLSL)

Requirements

This tool works independently of any particular platform.

Runtime (User) Requirements

  • .NET 6 Preview 7 or greater

This means that SharpX will not work at natively on Unity at this time. However, since SharpX itself is provided as a library and executable, it can be run in the UnityEditor by writing simple wrapper editor extension code.

Developer Requirements

  • .NET 6 Preview 7 or greater
  • Visual Studio 2022 Preview 3 or greater

Documentation

Full documentation is available at docs directory in this repository.

Questions

Should I use SharpX?

No. SharpX is an experimental tool and is not recommended to be used in a production environment if possible. Also, some people have told to me in the past, quality is poor.

What softwares are using SharpX?

At the very least, I've been using SharpX and SharpX ShaderLab plugin to create shaders for my own VRChat avatars.

Similar Projects

License

MIT by @6jz

About

An Extensible Experimental C# to X Transpiler & Compiler.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages