Cargo Features

[dependencies]
newton-regorus = { version = "0.2.0", default-features = false, features = ["no_std", "std", "arc", "ast", "azure_policy", "azure-rbac", "base64url", "coverage", "hex", "http", "glob", "graph", "jsonschema", "net", "opa-runtime", "regex", "rvm", "semver", "time", "uuid", "urlquery", "yaml", "full-opa", "opa-no-std", "rego-extensions", "newton-crypto", "newton-tlsn", "newton-identity", "opa-testutil", "rand"] }
default = arc, full-opa, rvm

These default features are set whenever newton-regorus is added without default-features = false somewhere in the dependency tree.

no_std opa-no-std?

Enables spin_no_std of lazy_static

std full-opa newton-identity? = msvc_spectre_libs

Enables std of serde_json and std and std_rng of rand ^0.9.0

Specify thread_rng for in order to use random_range

arc default azure_policy? opa-no-std?
ast
azure_policy = arc, dashmap

Enables jsonschema ^0.30.0

Affects compile::compile_policy_for_target, engine::PolicyPackageNameDefinition, engine::PolicyParameter, engine::PolicyModifier, engine::PolicyParameters, interpreter::error, interpreter::target, newton-regorus::registry, newton-regorus::target, policy_info::PolicyInfo.parameters, interpreter::eval_file_with_rule_evaluation

azure-rbac

Affects languages::azure_rbac, lexer::AzureRbacTokenKind, newton-regorus::languages.azure_rbac

base64 base64url full-opa opa-no-std?

Enables data-encoding

coverage full-opa opa-no-std?

Affects newton-regorus::coverage

hex full-opa newton-crypto? opa-no-std?

Enables data-encoding

http full-opa
glob full-opa

Enables globset

graph full-opa opa-no-std?
jsonschema full-opa

Enables jsonschema ^0.30.0

net full-opa

Enables ipnet

opa-runtime full-opa opa-no-std?
regex full-opa opa-no-std?

Enables regex

rvm default

Enables bincode ^2.0.1 and indexmap

indexmap:

rvm related deps

Affects newton-regorus::languages.rego, newton-regorus::rvm

semver full-opa opa-no-std?

Enables semver

time full-opa

Enables chrono and chrono-tz

uuid full-opa

Enables uuid

urlquery full-opa

Enables url

yaml full-opa = serde_yaml
full-opa default = base64, base64url, coverage, glob, graph, hex, http, jsonschema, net, opa-runtime, regex, semver, std, time, urlquery, uuid, yaml
opa-no-std = arc, base64, base64url, coverage, graph, hex, no_std, opa-runtime, regex, semver

Full OPA features including custom mimalloc allocator (not available on crates.io)
Use this when building from source for memory limit tracking.
To enable, uncomment the mimalloc dependency and related features above.
full-opa-local = [
"full-opa",
"allocator-memory-limits",
"mimalloc",
]

Features that can be used in no_std environments.
Note that: the spin_no_std feature in lazy_static must be specified.

Enables spin_no_std of lazy_static

rego-extensions

Rego language extensions

newton-crypto = hex

Newton-specific Rego extensions for Ethereum cryptography

Enables alloy-primitives ^0.8 and k256

alloy-primitives:

Newton extension dependencies

Affects extensions::crypto, newton-regorus::extensions

newton-tlsn

Newton-specific Rego extensions for TLSNotary presentation verification

Enables bcs ^0.1.6, bincode ^2.0.1, blake3, data-encoding, p256, rs_merkle, sha2 ^0.10, and tiny-keccak

Affects extensions::tlsn, newton-regorus::extensions

newton-identity = std

Newton-specific Rego extensions for Identity checks

Enables chrono

Affects extensions::identity, newton-regorus::extensions

opa-testutil

This feature enables some testing utils for OPA tests.

rand std?

Enables rand ^0.9.0

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.

serde_yaml yaml?
msvc_spectre_libs std?

Enables msvc_spectre_libs

Causes the project to link with the Spectre-mitigated CRT and libs.

dashmap azure_policy?