![]() |
VOOZH | about |
dotnet add package Opa.Wasm --version 0.91.0
NuGet\Install-Package Opa.Wasm -Version 0.91.0
<PackageReference Include="Opa.Wasm" Version="0.91.0" />
<PackageVersion Include="Opa.Wasm" Version="0.91.0" />Directory.Packages.props
<PackageReference Include="Opa.Wasm" />Project file
paket add Opa.Wasm --version 0.91.0
#r "nuget: Opa.Wasm, 0.91.0"
#:package Opa.Wasm@0.91.0
#addin nuget:?package=Opa.Wasm&version=0.91.0Install as a Cake Addin
#tool nuget:?package=Opa.Wasm&version=0.91.0Install as a Cake Tool
Built and tested against Open Policy Agent v1.9.0
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. |
This package is not used by any NuGet packages.
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 |