bijux-dag-runtime 0.4.1

Execution engine, replay semantics, and runtime policy layer for Bijux DAG graphs.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! Runtime policy configuration.
pub(crate) mod evaluator;
pub(crate) mod trace;

pub use crate::PolicyConfig;
use bijux_dag_core::Effect;

pub fn policy_allows_effects(policy: &PolicyConfig, effects: &[Effect]) -> bool {
    for effect in effects {
        match effect {
            Effect::Network if policy.deny_network => return false,
            Effect::Env if policy.deny_env => return false,
            Effect::Clock if policy.deny_clock => return false,
            _ => {}
        }
    }
    true
}