Skip to content
forked from curiosity-ai/h5

๐Ÿš€ The next generation C# to JavaScript compiler

License

Notifications You must be signed in to change notification settings

gitter-badger/h5

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

h5 - C# to JavaScript compiler, now on .NET Core 3.1 ๐Ÿš€

This repository contains an experimental fork of the original Bridge C# to Javascript compiler.

The key goal with this fork is to bring it closer to the C# .NET Core 3.1 / .NET Standard world, and experiment with new ideas for supporting a more integrated development experience (such as the awesome new C# Source Generators).

Package NuGet Azure DevOps
Compiler Nuget Build Status
Base Library Nuget Build Status
Core Library Nuget Build Status
SDK Target Nuget Build Status
Json Library Nuget Build Status

Getting Started โšก

This new compiler build is fully based on netstandard2.0 & netcore3.1, and removes all dependencies on the legacy .NET Framework.

To get started with it, you can use the following project template

<Project Sdk="h5.Target/0.0.8018">
  <PropertyGroup>
    <TargetFramework>netstandard2.0</TargetFramework>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="h5" Version="*" />
    <PackageReference Include="h5.Core" Version="*" />
  </ItemGroup>
</Project>

The Sdk target above (<Project Sdk="h5.Target/0.0.8018">) will automatically install (and update) the compiler as a dotnet global tool. Don't forget to run dotnet restore to fill the versions with the latest values. You can also manually install it with:

dotnet tool update --global h5-compiler

We'll very soon add a dotnet new template supporting h5.

Breaking Changes ๐Ÿ’ฅ

This experimental fork introduces a series of breaking changes as part of the modernization effort:

  • Projects must explicitly target netstandard2.0.
  • Drop support to the legacy .csproj format (only SDK-style projects)
  • Drop support for legacy (and unused) command line arguments (check h5 -h for the current supported arguments)
  • Compiler is now distributed as a dotnet global tool and have it's own versioning and auto-update on build (this can be disable by setting <UpdateH5>false<UpdateH5/> on your project file.
  • Retyped packages are not supported (as those are maintained by the Bridge authors, and cannot be built separately or consumed without Bridge).
  • Logging and Report options have been removed from the h5.json config file. Logging settings will be available only as a command line argument (and exposed as a Project file option in the future)

Other breaking changes will probably be introduced with the goal of supporting:

  • Full multiplatform (Windows, Linux & MacOS) compilation without any need for Mono.
  • Compiler-as-a-service mode - similar to how Rosyln can be hosted in process.

Update Notes ๐Ÿ“‘

To avoid any conflicts with the original Bridge ecosystem, we've renamed the base library and compiler in this repository, and they're distributed for now completely separated from the officially supported Bridge/Retyped packages.

The currently available NuGet packages are:

Other packages might be added in the future as we experiment with this fork, but we do not aim on providing any kind of Retyped replacement here.

About

๐Ÿš€ The next generation C# to JavaScript compiler

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 81.0%
  • JavaScript 18.7%
  • Other 0.3%