Opa.Wasm 0.19.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Opa.Wasm --version 0.19.0
NuGet\Install-Package Opa.Wasm -Version 0.19.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.19.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Opa.Wasm --version 0.19.0
#r "nuget: Opa.Wasm, 0.19.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.
// Install Opa.Wasm as a Cake Addin
#addin nuget:?package=Opa.Wasm&version=0.19.0

// Install Opa.Wasm as a Cake Tool
#tool nuget:?package=Opa.Wasm&version=0.19.0

About

Built and tested against Open Policy Agent v0.34.

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 opaPolicy = new OpaPolicy("example.wasm");
opaPolicy.SetData(@"{""world"": ""world""}");
string output = opaPolicy.Evaluate(@"{""message"": ""world""}");

For higher-performance scenarios, you can keep the runtime as well as the loaded WASM module around:

using var opaRuntime = new OpaRuntime();
using var module = opaRuntime.Load("example.wasm");

// Now instantiate as many policy objects you want on top of the runtime & module
using var opaPolicy = new OpaPolicy(opaRuntime, module);
Product 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 was computed.  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. 
.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.

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.82.0 1,082 3/17/2024
0.81.0 1,153 1/3/2024
0.80.0 8,736 5/26/2023
0.70.0 35,317 1/29/2023
0.60.0 350 12/9/2022
0.50.0 365 11/10/2022
0.40.0 518 9/27/2022
0.33.0 403 8/30/2022
0.32.0 451 7/30/2022
0.31.0 2,382 4/5/2022
0.30.0 478 3/10/2022
0.23.0 16,430 2/7/2022
0.22.0 316 1/8/2022
0.21.0 319 1/5/2022
0.20.0 6,830 11/18/2021
0.19.0 369 11/7/2021
0.18.0 366 11/2/2021
0.17.0 370 10/6/2021
0.16.0 342 9/18/2021
0.15.0 353 9/1/2021
0.14.0 35,396 6/16/2021
0.13.0 431 5/22/2021
0.12.0 356 4/27/2021
0.11.0 370 3/20/2021
0.9.0 1,130 1/24/2021
0.8.0 411 1/21/2021
0.7.0 363 1/15/2021
0.6.0 1,216 11/7/2020
0.5.0 490 8/3/2020
0.4.0 506 7/2/2020
0.3.0 495 7/2/2020
0.2.1 504 3/9/2020
0.2.0 508 3/9/2020
0.1.0 774 11/19/2019