VOOZH about

URL: https://www.nuget.org/packages/Opa.Wasm/

⇱ NuGet Gallery | Opa.Wasm 0.91.0




Opa.Wasm 0.91.0

dotnet add package Opa.Wasm --version 0.91.0
 
 
NuGet\Install-Package Opa.Wasm -Version 0.91.0
 
 
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="Opa.Wasm" Version="0.91.0" />
 
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Opa.Wasm" Version="0.91.0" />
 
Directory.Packages.props
<PackageReference Include="Opa.Wasm" />
 
Project file
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 Opa.Wasm --version 0.91.0
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Opa.Wasm, 0.91.0"
 
 
#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 Opa.Wasm@0.91.0
 
 
#: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=Opa.Wasm&version=0.91.0
 
Install as a Cake Addin
#tool nuget:?package=Opa.Wasm&version=0.91.0
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

About

Built and tested against Open Policy Agent v1.9.0

Features

  • Simple API on top of Open Policy Agent Web Assembly ABI
  • Support for advanced scenarios (runtime and module caching)
  • Fast execution path on ABI version 1.2 and greater
  • Ability to define builtin0-4
  • Extended error messages via opa_abort / Wasmtime.TrapException

Usage

The simplest use case - load a WASM module into a policy object, pass data and evaluate based on input:

using var module = OpaPolicyModule.Load("example.wasm");
using var opaPolicy = module.CreatePolicyInstance();

// Use the typed methods to interact with the policy instance
opaPolicy.SetData(new { world = "world" });
var output = opaPolicy.Evaluate<bool>(new { message = "world" });

// Alternatively, send raw Json for the utmost control (advanced scenario)
opaPolicy.SetDataJson(@"{""world"": ""world""}");
string output = opaPolicy.EvaluateJson(@"{""message"": ""world""}");

For higher-performance scenarios, you can keep the engine as well as the loaded WASM module around. Note that one engine can handle multiple modules, and the OpaPolicyModule keeps the correct reference to the engine to guarantee thread safety:

using var engine = OpaPolicyModule.CreateEngine();
using var opaPolicyModule = OpaPolicyModule.Load("example.wasm", engine);

// Now instantiate as many policy objects you want on top of the engine & module
using var opaPolicy = opaPolicyModule.CreatePolicyInstance();
Product Versions Compatible and additional computed target framework versions.
.NET 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.91.0 1,715 10/10/2025
0.90.0 15,525 12/24/2024
0.82.0 19,204 3/17/2024
0.81.0 1,605 1/3/2024
0.80.0 25,405 5/26/2023
0.70.0 36,725 1/29/2023
0.60.0 709 12/9/2022
0.50.0 734 11/10/2022
0.40.0 861 9/27/2022
0.33.0 786 8/30/2022
0.32.0 822 7/30/2022
0.31.0 2,824 4/5/2022
0.30.0 872 3/10/2022
0.23.0 17,100 2/7/2022
0.22.0 730 1/8/2022
0.21.0 716 1/5/2022
0.20.0 7,202 11/18/2021
0.19.0 760 11/7/2021
0.18.0 750 11/2/2021
0.17.0 754 10/6/2021
Loading failed