WACS.WASI.GFX.DependencyInjection
0.1.1-preview
dotnet add package WACS.WASI.GFX.DependencyInjection --version 0.1.1-preview
NuGet\Install-Package WACS.WASI.GFX.DependencyInjection -Version 0.1.1-preview
<PackageReference Include="WACS.WASI.GFX.DependencyInjection" Version="0.1.1-preview" />
<PackageVersion Include="WACS.WASI.GFX.DependencyInjection" Version="0.1.1-preview" />
<PackageReference Include="WACS.WASI.GFX.DependencyInjection" />
paket add WACS.WASI.GFX.DependencyInjection --version 0.1.1-preview
#r "nuget: WACS.WASI.GFX.DependencyInjection, 0.1.1-preview"
#:package WACS.WASI.GFX.DependencyInjection@0.1.1-preview
#addin nuget:?package=WACS.WASI.GFX.DependencyInjection&version=0.1.1-preview&prerelease
#tool nuget:?package=WACS.WASI.GFX.DependencyInjection&version=0.1.1-preview&prerelease
WACS.WASI.GFX.DependencyInjection
Microsoft.Extensions.DependencyInjection extensions for
WACS.WASI.GFX.
Symmetric with WACS.WASI.NN.DependencyInjection and
WACS.WASI.Preview2.DependencyInjection.
Usage
using Wacs.WASI.Preview2.DependencyInjection;
using Wacs.WASI.GFX.DependencyInjection;
using Wacs.WASI.GFX.Silk;
services
.AddWasiPreview2()
.AddWasiGfx(b => b.WithBackend(new SilkGfxBackend()))
.AddWasiPreview2GfxBundle(); // composite for the
// single hostBundle slot
The composite WasiPreview2GfxBundle forwards property
lookups to either the Preview2 sub-bundle or the wasi-gfx
sub-bundle. Components importing both wasi:cli/* and any
wasi-gfx package resolve through one bundle slot.
What's in the box
WasiGfxBundle carries the configuration + backend.
WasiPreview2GfxBundle is the composite the transpiler's
HostPackageResolver direct-links against when both Preview2
and wasi-gfx are loaded.
Per-resource impl classes (Context, AbstractBuffer,
Surface, Device, Buffer) follow the SourceGen-resource
convention — parameterless ctor + Create(), with the
backend pulled from WasiGfxAmbient at construction time.
They live in this package and the resolver discovers them via
TryFindResourceImpl.
Both engines run wasi-gfx components end-to-end:
# Interpreter component path:
wacs run --wasi-gfx --windowed my.component.wasm
# Transpiler direct-link path:
wacs run --wasip2 --wasi-gfx --windowed my.component.wasm
AddWasiGfx + AddWasiPreview2GfxBundle register everything
via Microsoft.Extensions.DependencyInjection. The CLI
auto-wires both at startup via the
WasiPreview2RuntimeScope.ReflectivelyAddWasiGfx hook in
Preview2's DI scope.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.1 is compatible. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.0)
- WACS (>= 0.15.20)
- WACS.ComponentModel (>= 0.4.0)
- WACS.WASI.GFX (>= 0.2.0-preview)
- WACS.WASI.Preview2.DependencyInjection (>= 0.2.2)
-
net8.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.0)
- WACS (>= 0.15.20)
- WACS.ComponentModel (>= 0.4.0)
- WACS.WASI.GFX (>= 0.2.0-preview)
- WACS.WASI.Preview2.DependencyInjection (>= 0.2.2)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on WACS.WASI.GFX.DependencyInjection:
| Package | Downloads |
|---|---|
|
WACS.WASI.GFX.Silk
Silk.NET/SDL + wgpu-native backend for WACS.WASI.GFX. Implements IBackend for wasi:graphics-context, wasi:surface, wasi:frame-buffer, and wasi:webgpu on top of SDL2 + wgpu-native via Silk.NET. Ships as a sibling NuGet so consumers wiring a different backend don't pull SDL's or wgpu-native's binaries. Preview: tracks the wasi-gfx proposal at WASI Phase 2 — the WIT surface may change as the proposal evolves. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.1-preview | 52 | 5/16/2026 |