OpaDotNet.Compilation.Cli 2.0.0

dotnet add package OpaDotNet.Compilation.Cli --version 2.0.0
                    
NuGet\Install-Package OpaDotNet.Compilation.Cli -Version 2.0.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="OpaDotNet.Compilation.Cli" Version="2.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OpaDotNet.Compilation.Cli" Version="2.0.0" />
                    
Directory.Packages.props
<PackageReference Include="OpaDotNet.Compilation.Cli" />
                    
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 OpaDotNet.Compilation.Cli --version 2.0.0
                    
#r "nuget: OpaDotNet.Compilation.Cli, 2.0.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 OpaDotNet.Compilation.Cli@2.0.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=OpaDotNet.Compilation.Cli&version=2.0.0
                    
Install as a Cake Addin
#tool nuget:?package=OpaDotNet.Compilation.Cli&version=2.0.0
                    
Install as a Cake Tool

About

Rego compiler which uses opa cli too for policy bundle compilation and packaging.

Basically, it's equivalent to executing opa build.

Example

Important. You will need opa cli tool v0.20.0+ to be in your PATH or provide full path in RegoCliCompilerOptions.

using OpaDotNet.Compilation.Cli;

var compiler = new RegoCliCompiler();

// Equivalent to: opa built -t wasm -e 'example/hello' ./example.rego
var bundleStream = await compiler.CompileFileAsync("example.rego", new() { Entrypoints = new HashSet<string>(["example/hello"]) });
...
Product Compatible and additional computed target framework versions.
.NET 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 is compatible.  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. 
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
2.0.0 227 3/11/2025
2.0.0-preview-0010 214 3/5/2025
2.0.0-preview-0008 95 2/26/2025
2.0.0-preview-0002 108 11/10/2024
2.0.0-preview-0000 99 10/25/2024
1.8.0-preview0005 106 7/12/2024
1.7.4 274 8/6/2024
1.7.3 161 6/14/2024
1.7.2 156 6/13/2024
1.7.1 147 6/12/2024
1.7.0 160 5/15/2024
1.6.1 270 2/9/2024
1.6.0 248 1/10/2024
1.5.0 247 11/21/2023
1.5.0-preview0001 137 11/21/2023
1.4.1 201 10/10/2023
1.4.0 182 10/9/2023
1.3.1 207 9/27/2023
1.2.2 209 9/18/2023
1.2.1 173 9/18/2023
1.2.0 207 8/23/2023
1.1.3 230 8/18/2023
1.1.1 216 8/17/2023
1.1.0 215 8/17/2023
1.0.0 208 8/16/2023