Installation
How to add the APL/AI-Eval profile to your Rust project.
Requirements
- Rust 1.75.0 or later
apl-coreas a peer dependency
Basic
Add both crates to your Cargo.toml:
[dependencies]
apl-core = { git = "https://github.com/evidentum-io/apl-core" }
apl-ai-eval = { git = "https://github.com/evidentum-io/apl-core" }Both crates live in the same workspace repository; the AI-Eval profile is a workspace member of apl-core.
Activating the profile
AiEvalProfile is a unit struct — pass an instance directly to verify_receipt / evaluate_relation:
use apl_core::prelude::*;
use apl_ai_eval::AiEvalProfile;
let profile = AiEvalProfile;
let (output, _) = verify_receipt(
receipt_bytes,
carrier,
&frames,
&bridges,
Some(&profile),
);Registering diagnostic codes
If your application deserializes DiagnosticCode values from AI-Eval JSON output, call the zero-argument register() helper once at startup (e.g. at the top of main()). It registers every AI-Eval–specific diagnostic code in the APL-Core whitelist and is idempotent.
fn main() {
apl_ai_eval::register();
// … application startup …
}register() does NOT wire the profile into a verifier — the profile is passed explicitly via the profile: Option<&dyn Profile> parameter of verify_receipt / evaluate_relation (see above). register() exists only to extend the diagnostic-code whitelist so that DiagnosticCode deserialization accepts AI-Eval codes.
See Examples for end-to-end usage.