Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
regorust
Rego is the native query language of the Open Policy Agent project. If you want to learn more about Rego as a language, and its various use cases, we refer you to the language documentation above which OPA provides.
This crate is a wrapper around rego-cpp, an open source cross-platform C++
implementation of the Rego language compiler and runtime developed and maintained
by Microsoft. You can learn more about that project
here. As much as possible in this
wrapper we try to provide idiomatic Rust interfaces to the Rego query engine.
We hope the project is of use to those wishing to leverage the power of Rego
within a Rust context.
Example Usage
use Interpreter;
use Interpreter;
Language Support
We support v1.18.1 of Rego as defined by OPA. For the full supported grammar, see the Language Support section of the main README.
Builtins
We support the majority of the standard Rego built-ins, and provide a robust mechanism for including custom built-ins (via the CPP API). The following builtins are NOT supported at present:
crypto.x509.parse_and_verify_certificates_with_options- Not yet implemented (no OPA conformance tests available)graphql.*- Not plannedhttp.send- Not plannedjson.match_schema/json.verify_schema- Not plannednet.*- Not plannedproviders.aws.sign_req- Not plannedrego.metadata.chain/rego.metadata.rule/rego.parse_module- Not plannedstrings.render_template- Not plannedtime- This is entirely platform dependent at the moment, depending on whether there is a compiler on that platform which supports__cpp_lib_chrono >= 201907L.
Compatibility with the OPA Rego Go implementation
Our goal is to achieve and maintain full compatibility with the reference Go implementation. We have developed a test driver which runs the same tests and validates that we produce the same outputs. At this stage we pass all the non-builtin specific test suites, which we clone from the OPA repository. To build with the OPA tests available for testing, use one of the following presets:
release-clang-oparelease-opa