Expand description
The Aranya Policy Virtual Machine
See the policy book for more information on the policy language.
Re-exports§
pub use aranya_policy_ast as ast;
Modules§
- ast
- The Aranya Policy Language’s AST.
- ffi
- The VM’s foreign function interface.
- named
NamedMapand associated traits and types.
Macros§
- arg
- Shorthand for creating
Args. - ident
- Creates an
Identifierfrom a string literal. - text
- Creates a
Textfrom a string literal.
Structs§
- Action
Context - Context for actions
- Action
Def - An action definition.
- Action
DefResolver - The resolver for an archived
ActionDef - Archived
Action Def - An archived
ActionDef - Archived
Attribute - An archived
Attribute - Archived
Code Map - An archived
CodeMap - Archived
Command Def - An archived
CommandDef - Archived
Fact - An archived
Fact - Archived
Fact Key - An archived
FactKey - Archived
Fact Value - An archived
FactValue - Archived
Field - An archived
Field - Archived
Label - An archived
Label - Archived
Module - An archived
Module - Archived
Module V0 - An archived
ModuleV0 - Archived
Struct - An archived
Struct - Attribute
- A command attribute.
- Attribute
Resolver - The resolver for an archived
Attribute - Bench
Measurements bench - Holds durations
- Bench
Stat bench - Benchmarking statistics
- CodeMap
- The code map contains the original source and can map VM instructions to text ranges inside that source.
- Code
MapResolver - The resolver for an archived
CodeMap - Command
Def - A command definition.
- Command
DefResolver - The resolver for an archived
CommandDef - Fact
- A Fact
- FactKey
- One labeled value in a fact key. A sequence of FactKeys mapped to a sequence of FactValues comprises a Fact.
- Fact
KeyResolver - The resolver for an archived
FactKey - Fact
Resolver - The resolver for an archived
Fact - Fact
Value - One labeled value in a fact value.
- Fact
Value Resolver - The resolver for an archived
FactValue - Field
- A struct or command field.
- Field
Resolver - The resolver for an archived
Field - Identifier
- A textual identifier which matches
[a-zA-Z][a-zA-Z0-9_]*. - KVPair
- A generic key/value pair. Used for Effects and Command fields. Technically identical to a FactValue but separate to distinguish usage.
- Label
- Labels are branch targets and execution entry points.
- Label
Resolver - The resolver for an archived
Label - Machine
- The core policy VM type.
- Machine
Error - An error returned by
Machine. - Machine
Stack - An implementation of
Stack. - Module
- The serializable state of
a
Machine. - Module
Resolver - The resolver for an archived
Module - Module
V0 - The Version 0 module format
- Module
V0Resolver - The resolver for an archived
ModuleV0 - Open
Context - Context for open blocks
- Policy
Context - Context for Policy and Recall blocks
- Range
Error - An error for a range that doesn’t exist. Used in CodeMap.
- RunState
- The “run state” of the machine.
- Seal
Context - Context for seal blocks
- Spanned
Text - This is a simplified version of Pest’s
Span. We can’t use Pest’s version because we need to work inno_stdenvironments. - Stopwatch
bench - Measures and records times for named tasks.
- Struct
- A Struct value
- Struct
Resolver - The resolver for an archived
Struct - Text
- A string-like value which is utf8 without nul bytes.
- Unsupported
Version - Unsupported
Moduleversion.
Enums§
- Archived
Exit Reason - An archived
ExitReason - Archived
Hashable Value - An archived
HashableValue - Archived
Instruction - An archived
Instruction - Archived
Label Type - An archived
LabelType - Archived
Meta - An archived
Meta - Archived
Module Data - An archived
ModuleData - Archived
Target - An archived
Target - Archived
Value - An archived
Value - Command
Context - Properties of policy execution available through FFI.
- Exit
Reason - Reason for ending execution.
- Exit
Reason Resolver - The resolver for an archived
ExitReason - Hashable
Value - The subset of Values that can be hashed. Only these types of values can be used in the key portion of a Fact.
- Hashable
Value Resolver - The resolver for an archived
HashableValue - Instruction
- The machine instruction types
- Instruction
Resolver - The resolver for an archived
Instruction - Label
Type - Types of Labels
- Label
Type Resolver - The resolver for an archived
LabelType - Machine
Error Type - Possible machine errors.
- MachineIO
Error - An I/O error.
- Machine
Status - Status of machine execution after stepping through each instruction.
- Meta
- Compiler Tracer metadata
- Meta
Resolver - The resolver for an archived
Meta - Module
Data - Versioned
Moduledata. - Module
Data Resolver - The resolver for an archived
ModuleData - Target
- The target of a branch
- Target
Resolver - The resolver for an archived
Target - Value
- All of the value types allowed in the VM
- Value
Conversion Error - Indicates that the Value conversion has failed
- Value
Resolver - The resolver for an archived
Value - Version
- Identifies a
Module.
Traits§
- MachineIO
- The part of a
Machinethat performs I/O. - Stack
- A stack data structure.
- TryAs
Mut - Like
AsMut, but fallible. - TryFrom
Value - Trait for converting from a
Value, similar toTryFrom<Value>. - Typed
- Allows a type to be used by FFI derive.
Functions§
- bench_
aggregate bench - Adds the given measurements to the global measurements.
- bench_
measurements bench - Returns the accumulated benchmarking measurements.
Type Aliases§
- BaseId
- The base ID type.
- Fact
KeyList - A list of fact keys.
- Fact
Value List - A list of fact values.