WACS 0.7.4
.NET 8.0
This package targets .NET 8.0. The package is compatible with this framework or higher.
.NET Standard 2.1
This package targets .NET Standard 2.1. The package is compatible with this framework or higher.
dotnet add package WACS --version 0.7.4
NuGet\Install-Package WACS -Version 0.7.4
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="WACS" Version="0.7.4" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="WACS" Version="0.7.4" />
<PackageReference Include="WACS" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add WACS --version 0.7.4
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: WACS, 0.7.4"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package WACS@0.7.4
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=WACS&version=0.7.4
#tool nuget:?package=WACS&version=0.7.4
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
WACS (C# WebAssembly Interpreter)
Overview
WACS is a pure C# WebAssembly Interpreter designed for .NET environments, including Unity's IL2CPP. It allows seamless execution of WASM modules with minimal setup, offering compatibility and advanced interop features.
Features
- Pure C# Implementation: Built with C# 9.0/.NET Standard 2.1 (no unsafe code).
- Unity Compatibility: Supports Unity 2021.3+ with IL2CPP/AOT compatibility.
- Godot Compatibility: Compatible with Godot Engine - .NET.
- Full WebAssembly MVP Compliance: Passes the WebAssembly spec test suite.
- Interop Bindings: Host bindings created through reflection, requiring no boilerplate.
- WASI Support: WACS.WASIp1 provides a wasi_snapshot_preview1 implementation.
Installation
Install WACS from NuGet:
dotnet add package WACS
Usage Example
Here's a basic example demonstrating how to load and run a WebAssembly module:
using System;
using System.IO;
using Wacs.Core;
using Wacs.Core.Runtime;
var runtime = new WasmRuntime();
runtime.BindHostFunction<Action<char>>(("env", "sayc"), c => Console.Write(c));
using var fileStream = new FileStream("HelloWorld.wasm", FileMode.Open);
var module = BinaryModuleParser.ParseWasm(fileStream);
var modInst = runtime.InstantiateModule(module);
runtime.RegisterModule("hello", modInst);
if (runtime.TryGetExportedFunction(("hello", "main"), out var mainAddr))
{
var mainInvoker = runtime.CreateInvokerFunc<Value>(mainAddr);
int result = mainInvoker();
Console.Error.WriteLine($"hello.main() => {result}");
}
License
WACS is distributed under the Apache 2.0 License, allowing usage in both open-source and commercial projects.
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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.1
- FluentValidation (>= 11.10.0)
- Microsoft.Extensions.ObjectPool (>= 9.0.0)
-
net8.0
- FluentValidation (>= 11.10.0)
- Microsoft.Extensions.ObjectPool (>= 9.0.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on WACS:
Package | Downloads |
---|---|
WACS.WASIp1
WASI preview 1 implementation for WACS |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated |
---|---|---|
0.7.4 | 122 | 2/24/2025 |
0.7.3 | 111 | 2/6/2025 |
0.7.2 | 116 | 2/6/2025 |
0.7.1 | 125 | 2/6/2025 |
0.7.0 | 102 | 1/14/2025 |
0.6.0 | 152 | 12/15/2024 |
0.3.0 | 112 | 12/1/2024 |
0.2.0 | 162 | 11/26/2024 |
0.1.6 | 102 | 11/19/2024 |
0.1.5 | 102 | 11/18/2024 |
0.1.4 | 111 | 11/15/2024 |
0.1.3 | 104 | 11/14/2024 |
0.1.2 | 136 | 11/14/2024 |
0.1.1 | 144 | 11/13/2024 |
0.1.0 | 104 | 11/13/2024 |