Skip to main content

apl_core/
lib.rs

1// Location: ./crates/apl-core/src/lib.rs
2// Copyright 2025
3// SPDX-License-Identifier: Apache-2.0
4// Authors: Teryl Taylor
5//
6// APL core — Attribute Policy Language compiler + evaluator.
7//
8// This crate is the language nucleus. It does not depend on CPEX directly;
9// the bridge from cpex-core extensions into the AttributeBag lives in
10// `apl-cmf`, and the `PolicyEvaluator` implementation lives in `apl-cpex`.
11//
12// See docs/specs/apl-design.md for the full design.
13
14#![doc = "APL — Attribute Policy Language. See docs/specs/apl-design.md."]
15
16pub mod attributes;
17pub mod evaluator;
18pub mod parser;
19pub mod pipeline;
20pub mod plugin_decl;
21pub mod route;
22pub mod rules;
23pub mod step;
24
25pub use attributes::{AttributeBag, AttributeExtractor, AttributeValue};
26pub use evaluator::{
27    evaluate_effects, evaluate_pipeline, evaluate_rules, Decision, FieldOutcome, PipelineEvaluation,
28};
29pub use parser::{
30    compile_config, compile_policy_block_value, parse_pipeline, parse_predicate, parse_rule,
31    CompiledConfig, ConfigYaml, ParseError, RouteYaml,
32};
33pub use pipeline::{FieldRule, Pipeline, ScanKind, Stage, TaintEvent, TaintScope, TypeCheck};
34pub use plugin_decl::{
35    CapsView, EffectivePlugin, PluginDeclaration, PluginOverride, PluginRegistry,
36};
37pub use route::{evaluate_post, evaluate_pre, evaluate_route, RouteDecision, RoutePayload};
38pub use rules::{
39    CompareOp, CompiledRoute, Condition, Effect, Expression, Literal, Phase, PhaseSet, Rule,
40};
41pub use step::{
42    delegation_bag_keys, DelegateStep, DelegationError, DelegationInvoker, DelegationOutcome,
43    DispatchPhase, NoopDelegationInvoker, PdpCall, PdpDecision, PdpDialect, PdpError, PdpFactory,
44    PdpResolver, PluginError, PluginInvocation, PluginInvoker, PluginOutcome,
45};