Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion samples/bench/bootsharp/Boot.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net9.0-browser</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<RuntimeIdentifier>browser-wasm</RuntimeIdentifier>
<!-- NOTE: Embedding doesn't affect runtime performance, leaving it for future reference. -->
<BootsharpEmbedBinaries>false</BootsharpEmbedBinaries>
Expand Down
2 changes: 1 addition & 1 deletion samples/bench/dotnet-llvm/DotNetLLVM.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net9.0-browser</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<RuntimeIdentifier>browser-wasm</RuntimeIdentifier>
<OutputType>Exe</OutputType>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
Expand Down
2 changes: 1 addition & 1 deletion samples/bench/dotnet-llvm/init.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { dotnet } from "./bin/Release/net9.0-browser/browser-wasm/publish/dotnet.js";
import { dotnet } from "./bin/Release/net10.0/browser-wasm/publish/dotnet.js";

/** @returns {Promise<import("../bench.mjs").Exports>} */
export async function init() {
Expand Down
2 changes: 1 addition & 1 deletion samples/bench/dotnet-llvm/readme.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
1. Install .NET https://dotnet.microsoft.com/en-us/download
2. Install Binaryen https://github.com/WebAssembly/binaryen
3. Run `dotnet publish`
4. Run `wasm-opt bin/Release/net9.0-browser/browser-wasm/publish/dotnet.native.wasm -O3 -o bin/Release/net9.0-browser/browser-wasm/publish/dotnet.native.wasm --all-features --strip-dwarf --strip-debug --vacuum`
4. Run `wasm-opt bin/Release/net10.0/browser-wasm/publish/dotnet.native.wasm -O3 -o bin/Release/net10.0/browser-wasm/publish/dotnet.native.wasm --all-features --strip-dwarf --strip-debug --vacuum`

https://github.com/dotnet/runtime/issues/113979#issuecomment-2759220563
3 changes: 2 additions & 1 deletion samples/bench/dotnet/DotNet.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<OutputType>Exe</OutputType>
<RuntimeIdentifier>browser-wasm</RuntimeIdentifier>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<RunAOTCompilation>true</RunAOTCompilation>
Expand Down
2 changes: 1 addition & 1 deletion samples/bench/dotnet/init.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { dotnet } from "./bin/Release/net9.0/browser-wasm/AppBundle/_framework/dotnet.js";
import { dotnet } from "./bin/Release/net10.0/browser-wasm/AppBundle/_framework/dotnet.js";
import { getNumber, getStruct } from "../fixtures.mjs";

/** @returns {Promise<import("../bench.mjs").Exports>} */
Expand Down
2 changes: 1 addition & 1 deletion samples/bench/dotnet/readme.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
1. Install .NET https://dotnet.microsoft.com/en-us/download
2. Install Binaryen https://github.com/WebAssembly/binaryen
3. Run `dotnet publish`
4. Run `wasm-opt bin/Release/net9.0/browser-wasm/publish/dotnet.native.wasm -O3 -o bin/Release/net9.0/browser-wasm/publish/dotnet.native.wasm --all-features --strip-dwarf --strip-debug --vacuum`
4. Run `wasm-opt bin/Release/net10.0/browser-wasm/AppBundle/_framework/dotnet.native.wasm -O3 -o bin/Release/net10.0/browser-wasm/AppBundle/_framework/dotnet.native.wasm --all-features --strip-dwarf --strip-debug --vacuum`
8 changes: 8 additions & 0 deletions samples/bench/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,11 @@ All results are relative to the Rust baseline (lower is better).
| Fibonacci | `1.0` | `0.9` | `1.0` | `1.0` | `1.6` | `3.7` |
| Echo Number | `1.0` | `0.8` | `1.6` | `14.0` | `23.5` | `718.7` |
| Echo Struct | `1.0` | `1.0` | `2.0` | `2.5` | `5.9` | `15.2` |

## 2025 (.NET 10, Node.js 24)

| | Rust | Zig | .NET LLVM | Bootsharp | .NET AOT | Go |
|-------------|-------|-------|-----------|-----------|----------|---------|
| Fibonacci | `1.0` | `2.0` | `1.2` | `1.2` | `2.1` | `6.1` |
| Echo Number | `1.0` | `0.9` | `1.6` | `19.1` | `28.6` | `1057.0` |
| Echo Struct | `1.0` | `1.2` | `1.9` | `2.5` | `6.3` | `18.8` |
2 changes: 1 addition & 1 deletion samples/minimal/cs/Minimal.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<RuntimeIdentifier>browser-wasm</RuntimeIdentifier>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion samples/react/backend/Backend.Prime/Backend.Prime.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
4 changes: 2 additions & 2 deletions samples/react/backend/Backend.WASM/Backend.WASM.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<RuntimeIdentifier>browser-wasm</RuntimeIdentifier>
<ImplicitUsings>enable</ImplicitUsings>
<!-- Specify custom name for the generated JavaScript module. -->
Expand All @@ -23,7 +23,7 @@
<ItemGroup>
<PackageReference Include="Bootsharp" Version="*-*"/>
<PackageReference Include="Bootsharp.Inject" Version="*-*"/>
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.0"/>
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="10.0.2"/>
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion samples/react/backend/Backend/Backend.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
</PropertyGroup>

</Project>
9 changes: 5 additions & 4 deletions samples/trimming/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ To test and measure build size:

### Measurements (KB)

| | Raw | Brotli |
|-------------|-------|--------|
| .NET 8 | 2,298 | 739 |
| .NET 9 LLVM | 1,737 | 518 |
| | Raw | Brotli |
|--------------|-------|--------|
| .NET 8 | 2,298 | 739 |
| .NET 9 LLVM | 1,737 | 518 |
| .NET 10 LLVM | 1,610 | 482 |
2 changes: 1 addition & 1 deletion samples/trimming/cs/Trimming.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net9.0-browser</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<RuntimeIdentifier>browser-wasm</RuntimeIdentifier>
<!-- Not embedding binaries to source module reduces build size by ~30%. -->
<BootsharpEmbedBinaries>false</BootsharpEmbedBinaries>
Expand Down
12 changes: 6 additions & 6 deletions src/cs/Bootsharp.Common.Test/Bootsharp.Common.Test.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<IsPackable>false</IsPackable>
</PropertyGroup>
Expand All @@ -11,17 +11,17 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1"/>
<PackageReference Include="xunit" Version="2.9.2"/>
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.1"/>
<PackageReference Include="xunit" Version="2.9.3"/>
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.5">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="6.0.2">
<PackageReference Include="coverlet.collector" Version="6.0.4">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.msbuild" Version="6.0.2">
<PackageReference Include="coverlet.msbuild" Version="6.0.4">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
2 changes: 1 addition & 1 deletion src/cs/Bootsharp.Common/Bootsharp.Common.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<AssemblyTitle>Bootsharp.Common</AssemblyTitle>
Expand Down
16 changes: 8 additions & 8 deletions src/cs/Bootsharp.Generate.Test/Bootsharp.Generate.Test.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<IsPackable>false</IsPackable>
</PropertyGroup>
Expand All @@ -11,19 +11,19 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis" Version="4.11.0"/>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.SourceGenerators.Testing" Version="1.1.2"/>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1"/>
<PackageReference Include="xunit" Version="2.9.2"/>
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
<PackageReference Include="Microsoft.CodeAnalysis" Version="5.0.0"/>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.SourceGenerators.Testing" Version="1.1.3"/>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.1"/>
<PackageReference Include="xunit" Version="2.9.3"/>
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.5">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="6.0.2">
<PackageReference Include="coverlet.collector" Version="6.0.4">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.msbuild" Version="6.0.2">
<PackageReference Include="coverlet.msbuild" Version="6.0.4">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
2 changes: 1 addition & 1 deletion src/cs/Bootsharp.Generate/Bootsharp.Generate.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.11.0" PrivateAssets="all"/>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="5.0.0" PrivateAssets="all"/>
</ItemGroup>

</Project>
14 changes: 7 additions & 7 deletions src/cs/Bootsharp.Inject.Test/Bootsharp.Inject.Test.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
Expand All @@ -12,18 +12,18 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.0"/>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1"/>
<PackageReference Include="xunit" Version="2.9.2"/>
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="10.0.2"/>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.1"/>
<PackageReference Include="xunit" Version="2.9.3"/>
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.5">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="6.0.2">
<PackageReference Include="coverlet.collector" Version="6.0.4">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.msbuild" Version="6.0.2">
<PackageReference Include="coverlet.msbuild" Version="6.0.4">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
4 changes: 2 additions & 2 deletions src/cs/Bootsharp.Inject/Bootsharp.Inject.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<AssemblyTitle>Bootsharp.Inject</AssemblyTitle>
Expand All @@ -13,7 +13,7 @@

<ItemGroup>
<PackageReference Include="Bootsharp.Common" Version="$(Version)"/>
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="9.0.0"/>
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="10.0.2"/>
</ItemGroup>

</Project>
18 changes: 9 additions & 9 deletions src/cs/Bootsharp.Publish.Test/Bootsharp.Publish.Test.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<IsPackable>false</IsPackable>
</PropertyGroup>
Expand All @@ -11,20 +11,20 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.11.0"/>
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="17.12.6"/>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1"/>
<PackageReference Include="MSBuild.ProjectCreation" Version="14.0.0"/>
<PackageReference Include="xunit" Version="2.9.2"/>
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="5.0.0"/>
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="18.0.2"/>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.1"/>
<PackageReference Include="MSBuild.ProjectCreation" Version="17.0.1"/>
<PackageReference Include="xunit" Version="2.9.3"/>
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.5">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="6.0.2">
<PackageReference Include="coverlet.collector" Version="6.0.4">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.msbuild" Version="6.0.2">
<PackageReference Include="coverlet.msbuild" Version="6.0.4">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
8 changes: 4 additions & 4 deletions src/cs/Bootsharp.Publish/Bootsharp.Publish.csproj
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<InternalsVisibleTo Include="Bootsharp.Publish.Test"/>
<PackageReference Include="Microsoft.Build.Framework" Version="17.12.6" PrivateAssets="all"/>
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="17.12.6" PrivateAssets="all"/>
<PackageReference Include="System.Reflection.MetadataLoadContext" Version="9.0.0"/>
<PackageReference Include="Microsoft.Build.Framework" Version="18.0.2" PrivateAssets="all"/>
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="18.0.2" PrivateAssets="all"/>
<PackageReference Include="System.Reflection.MetadataLoadContext" Version="10.0.2"/>
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ private void RemoveWasmNag ()
// Removes "WebAssembly resource does not have the expected content type..." warning.

File.WriteAllText(dotnet, File.ReadAllText(dotnet, Encoding.UTF8)
.Replace("w('WebAssembly resource does not have the expected content type \"application/wasm\", so falling back to slower ArrayBuffer instantiation.')", "true"));
.Replace("E('WebAssembly resource does not have the expected content type \"application/wasm\", so falling back to slower ArrayBuffer instantiation.')", "true"));
}

private void PatchThreading ()
Expand Down
2 changes: 1 addition & 1 deletion src/cs/Bootsharp/Bootsharp.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<AssemblyTitle>Bootsharp</AssemblyTitle>
<PackageId>Bootsharp</PackageId>
<Description>Use C# in web apps with comfort.</Description>
Expand Down
2 changes: 1 addition & 1 deletion src/cs/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>

<PropertyGroup>
<Version>0.6.3</Version>
<Version>0.7.0</Version>
<Authors>Elringus</Authors>
<PackageTags>javascript typescript ts js wasm node deno bun interop codegen</PackageTags>
<PackageProjectUrl>https://bootsharp.com</PackageProjectUrl>
Expand Down
2 changes: 1 addition & 1 deletion src/js/test/cs/Test.Types/Test.Types.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
<CompilerGeneratedFilesOutputPath>bin/codegen</CompilerGeneratedFilesOutputPath>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/js/test/cs/Test/Test.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<Nullable>enable</Nullable>
<RuntimeIdentifier>browser-wasm</RuntimeIdentifier>
<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
Expand Down
Loading