1use reflex_rs::Reflex;
5
6fn main() {
7 println!("==================================================================");
8 println!("🦀 Reflex Rust SDK (reflex-rs) Quickstart");
9 println!("==================================================================");
10
11 let rx = Reflex::new();
12 let state = "Customer: I was billed $299 twice on my Visa card today. Refund immediately!";
13
14 let noul = rx.noul("Is the customer demanding a refund or chargeback?", state);
16 println!("\n1. Noul Boolean Decision:");
17 println!(" • Probability : {:.4}", noul.probability);
18 println!(" • Is True? : {}", noul.is_true);
19 println!(" • Confidence : {:.4}", noul.confidence);
20 println!(" • Uncertain? : {}", noul.is_uncertain);
21
22 let options = vec![
24 "billing".to_string(),
25 "technical_support".to_string(),
26 "sales".to_string(),
27 ];
28 let choice = rx.choice("Select operational department queue", options, state);
29 println!("\n2. Choice Rubric Selection:");
30 println!(" • Selected : {}", choice.selected);
31 println!(" • Confidence : {:.4}", choice.confidence);
32 for (opt, prob) in &choice.distribution {
33 println!(" - {:<18} : {:.4}", opt, prob);
34 }
35
36 let guard = rx.guardrail(state);
38 println!("\n3. Guardrail Security Audit:");
39 println!(" • Is Safe? : {}", guard.is_safe);
40 println!(" • Blocked? : {}", guard.blocked);
41 println!(" • Risk Score : {:.2}", guard.risk_score);
42
43 println!("\n==================================================================");
44 println!("✅ Rust System-1 execution complete. Zero external crate dependencies.");
45 println!("==================================================================");
46}