Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

friflo/Friflo.Vectorization.WebGPU

Repository files navigation

nuget Discord

friflo wgpu

Friflo Vectorization WebGPU

Designed to provide a high-performance WebGPU backend for https://github.com/friflo/Friflo.Vectorization.
It enables hardware-accelerated compute using wgpu-native with zero-overhead C# bindings."

Setup

Install dotnet tool ClangSharpPInvokeGenerator

dotnet tool install -g ClangSharpPInvokeGenerator

Download libraries

Download libraries and include from: https://github.com/gfx-rs/wgpu-native/releases
with Power Shell

./download-wgpu-native.ps1

Generate C# Binding

Generate initial WebGPU_native.cs with ClangSharp

ClangSharpPInvokeGenerator "@generate.rsp"

generated WebGPU_native.cs requires adjustments

Make Rider happy by adding the comments at the top

// ReSharper disable UnusedType.Global
// ReSharper disable InconsistentNaming
// ReSharper disable PartialTypeWithSinglePart

Strip long enum names.

./strip_enums.ps1

Strip long type names

./strip_types.ps1

Create .nupkg

dotnet pack -c Release "/p:Version=0.1.0-test.1"

Local Test

Register folder containing the created .nupkg searchable for nuget.

dotnet nuget add source "C:\...\Friflo.Vectorization.WebGPU\WebGPU.Runtime\bin\Release" --name "WebGPULocal"

Register new version of test package in your *.csproj

AltStyle によって変換されたページ (->オリジナル) /