curiosity-ai / h5

🚀 The next generation C# to JavaScript compiler
https://github.com/curiosity-ai/h5
Apache License 2.0
210 stars 30 forks source link
compiler csharp dotnet dotnet-core javascript javascript-compiler netcore webdevelopment

h5 🚀 - C# to JavaScript compiler

H5 is a modern fork of the original Bridge C# to Javascript compiler, updated to support multi-platform development using .NET 8.0 for the compiler and .NET Standard 2.1 for H5 projects, while dropping support for legacy features and dependencies.

H5 is under active development, and targets a more integrated and faster development experience for C# web-developers.

Package NuGet
Compiler Nuget
Base Library Nuget
Core Library Nuget
SDK Target Nuget
Json Library Nuget
Template Nuget
UI Toolkit Nuget

Getting Started âš¡

Gitter

H5 projects are based on netstandard2.1, and the compiler on net8.0, and removes legacy dependencies coming from the original Bridge source-code.

To get started with it, you can use the following project template (replace h5.Target/* with the latest version from h5.target).

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

The Sdk target above (<Project Sdk="h5.Target/*">) will automatically install (and update) the compiler as a dotnet global tool.

You can also manually install it with:

dotnet tool update --global h5-compiler

You can also install a dotnet new template (latest version: Nuget):

dotnet new --install h5.Template

And create a new project with:

dotnet new h5

Samples

The easiest way to get started is to check out some of the examples of using h5 in this repository.

Breaking Changes 💥

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

Update Notes 📑

To avoid any conflicts with the original Bridge ecosystem, all packages have been renamed. For upgrading, you can use the following mapping:

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. If you're missing any specific Retyped package, open an issue and I can take a look into publishing it derived from the Retyped ones.