Table of Contents

Policy Compilation

To evaluate policy modules they need to be compiled into WASM.

You can compile them manually with opa build -t wasm ... command or ask OpaDotNet do that for you.

OpaDotNet provides two options for policy compilation:

Which one you should be using?

Use OpaDotNet.Compilation.Cli if you have opa CLI tool available or you need functionality besides compilation (running tests, syntax checking etc.). Suitable for web applications and/or applications running in Docker containers. See README for more details.

Use OpaDotNet.Compilation.Interop if you need compilation only and want to avoid having external dependencies. Suitable for libraries, console application etc. See README for more details.