Infrastructure for packaging OPA policy and data files into bundles using opa cli tool
$ dotnet add package OpaDotNet.Compilation.CliRego compiler which uses opa cli too for policy bundle compilation and packaging.
Basically, it's equivalent to executing opa build.
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"]) });
...