WACS 0.7.5
dotnet add package WACS --version 0.7.5
NuGet\Install-Package WACS -Version 0.7.5
<PackageReference Include="WACS" Version="0.7.5" />
<PackageVersion Include="WACS" Version="0.7.5" />
<PackageReference Include="WACS" />
paket add WACS --version 0.7.5
#r "nuget: WACS, 0.7.5"
#:package WACS@0.7.5
#addin nuget:?package=WACS&version=0.7.5
#tool nuget:?package=WACS&version=0.7.5
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. |
-
.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 (2)
Showing the top 2 NuGet packages that depend on WACS:
| Package | Downloads |
|---|---|
|
Hako.Backend.WACS
A Hako backend which uses https://github.com/kelnishi/WACS, a WebAssembly runtime implemented in .NET Using this backend allows a .NET application using Hako to compile to any target where .NET is supported |
|
|
WACS.WASIp1
WASI preview 1 implementation for WACS |
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on WACS:
| Repository | Stars |
|---|---|
|
6over3/hako
An embeddable, lightweight, secure, high-performance JavaScript engine.
|
| Version | Downloads | Last Updated |
|---|---|---|
| 0.7.5 | 440 | 11/3/2025 |
| 0.7.4 | 207 | 2/24/2025 |
| 0.7.3 | 167 | 2/6/2025 |
| 0.7.2 | 159 | 2/6/2025 |
| 0.7.1 | 310 | 2/6/2025 |
| 0.7.0 | 149 | 1/14/2025 |
| 0.6.0 | 205 | 12/15/2024 |
| 0.3.0 | 152 | 12/1/2024 |
| 0.2.0 | 230 | 11/26/2024 |
| 0.1.6 | 142 | 11/19/2024 |
| 0.1.5 | 145 | 11/18/2024 |
| 0.1.4 | 163 | 11/15/2024 |
| 0.1.3 | 146 | 11/14/2024 |
| 0.1.2 | 196 | 11/14/2024 |
| 0.1.1 | 192 | 11/13/2024 |
| 0.1.0 | 162 | 11/13/2024 |