![]() |
VOOZH | about |
dotnet add package WACS.WASI.GFX.DependencyInjection --version 0.2.1-preview
NuGet\Install-Package WACS.WASI.GFX.DependencyInjection -Version 0.2.1-preview
<PackageReference Include="WACS.WASI.GFX.DependencyInjection" Version="0.2.1-preview" />
<PackageVersion Include="WACS.WASI.GFX.DependencyInjection" Version="0.2.1-preview" />Directory.Packages.props
<PackageReference Include="WACS.WASI.GFX.DependencyInjection" />Project file
paket add WACS.WASI.GFX.DependencyInjection --version 0.2.1-preview
#r "nuget: WACS.WASI.GFX.DependencyInjection, 0.2.1-preview"
#:package WACS.WASI.GFX.DependencyInjection@0.2.1-preview
#addin nuget:?package=WACS.WASI.GFX.DependencyInjection&version=0.2.1-preview&prereleaseInstall as a Cake Addin
#tool nuget:?package=WACS.WASI.GFX.DependencyInjection&version=0.2.1-preview&prereleaseInstall as a Cake Tool
Microsoft.Extensions.DependencyInjection extensions for
WACS.WASI.GFX.
Symmetric with WACS.WASI.NN.DependencyInjection and
WACS.WASI.Preview2.DependencyInjection.
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.
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(). Context /
Surface / Device prefer a bundle-taking ctor (the v1
phase-1g shape) and source the backend from
bundle.Configuration.Backend. The [static]buffer.from- graphics-buffer factory and any parameterless-ctor fallback
read from the AsyncLocal-scoped WasiGfxCurrent. 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 net5.0 was computed. net5.0-windows net5.0-windows was computed. net6.0 net6.0 was computed. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Core | netcoreapp3.0 netcoreapp3.0 was computed. netcoreapp3.1 netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.1 netstandard2.1 is compatible. |
| MonoAndroid | monoandroid monoandroid was computed. |
| MonoMac | monomac monomac was computed. |
| MonoTouch | monotouch monotouch was computed. |
| Tizen | tizen60 tizen60 was computed. |
| Xamarin.iOS | xamarinios xamarinios was computed. |
| Xamarin.Mac | xamarinmac xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos xamarinwatchos was computed. |
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. |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.2.1-preview | 60 | 5/28/2026 |
| 0.1.1-preview | 59 | 5/16/2026 |