Jazor 0.1.25
dotnet add package Jazor --version 0.1.25
NuGet\Install-Package Jazor -Version 0.1.25
<PackageReference Include="Jazor" Version="0.1.25" />
<PackageVersion Include="Jazor" Version="0.1.25" />
<PackageReference Include="Jazor" />
paket add Jazor --version 0.1.25
#r "nuget: Jazor, 0.1.25"
#:package Jazor@0.1.25
#addin nuget:?package=Jazor&version=0.1.25
#tool nuget:?package=Jazor&version=0.1.25
Jazor
Write JavaScript in C#.
Jazor is a C#-to-JavaScript compiler that translates Roslyn IOperation semantics into standard ECMAScript AST. The Jazor package carries the core runtime, analyzer, source generator, emit tool, MSBuild integration, and the baseline Vue 3 authoring surface.
Features
- C# → JS compilation — lowers Roslyn semantic model (
IOperation) to ESTree-compliant JavaScript via Acornima, preserving evaluation order and side-effect semantics. - Whitelist-gated runtime surface — only explicitly mapped CLR APIs are emitted as JavaScript. The bundled analyzer enforces these boundaries at compile time.
- Vue 3 authoring surface — write
defineComponent(),h(), typed props/slots, and reactive setups in C#; emitted JS is standard Vue 3 component shapes with no private runtime wrapper. - Record structural lowering — C# records lower to plain JS objects with
[Spread]flattening and staticnullomission, no runtime overhead. - Source Generator + MSBuild — whitelist generation, emit, and optional bundling run automatically during build. No extra toolchain required.
- Source Maps — every emitted
.mjsships with an accompanying.mjs.map.
Install
<ItemGroup>
<PackageReference Include="Jazor" Version="0.1.22" />
</ItemGroup>
Usage
Class libraries
Every project that declares [ECMAScriptModule] must reference Jazor:
<ItemGroup>
<PackageReference Include="Jazor" Version="0.1.22" />
</ItemGroup>
Keep JazorEmit disabled (default) in library projects.
Optional frontend ecosystem packages
Jazor no longer bundles higher-level Vue ecosystem libraries by default. Add them explicitly when your authoring surface needs them:
<ItemGroup>
<PackageReference Include="Jazor" Version="0.1.22" />
<PackageReference Include="ECMAScript.VueRoute" Version="0.1.22" />
<PackageReference Include="ECMAScript.Pinia" Version="0.1.22" />
<PackageReference Include="ECMAScript.Vuetify" Version="0.1.22" />
<PackageReference Include="ECMAScript.TDesign" Version="0.1.22" />
</ItemGroup>
ECMAScript.Vue3remains part of the defaultJazorpackage.ECMAScript.Pinia.Testingis a separate opt-in testing package layered on top ofECMAScript.Pinia.
Host / executable projects
The final executable or web host project enables emit and optionally bundling:
<ItemGroup>
<PackageReference Include="Jazor" Version="0.1.22" />
</ItemGroup>
<PropertyGroup>
<JazorEmit>true</JazorEmit>
<JazorOutDir>$(MSBuildProjectDirectory)\wwwroot\generated\</JazorOutDir>
<JazorBundle>false</JazorBundle>
</PropertyGroup>
JazorEmitscans the host output and referenced assemblies, emitting all declared modules together.JazorBundle=truebundles emitted modules through the bundled Deno runtime — no global Deno install needed on the consumer machine.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net11.0 is compatible. |
-
net11.0
- No dependencies.
NuGet packages (4)
Showing the top 4 NuGet packages that depend on Jazor:
| Package | Downloads |
|---|---|
|
ECMAScript.TDesign
TDesign Vue Next bindings and RazorVue authoring component stubs for ECMAScript. |
|
|
ECMAScript.Vuetify
Vuetify bindings and RazorVue authoring component stubs for ECMAScript. |
|
|
ECMAScript.Pinia
Pinia host bindings for ECMAScript runtime authoring. |
|
|
ECMAScript.VueRoute
Vue Router 4 host bindings for ECMAScript runtime authoring. |
GitHub repositories
This package is not used by any popular GitHub repositories.