diff --git a/examples/regorus.rs b/examples/regorus.rs index f805c17..22118da 100644 --- a/examples/regorus.rs +++ b/examples/regorus.rs @@ -70,7 +70,14 @@ fn rego_eval( engine.set_input(input); } - // Evaluate query. + // Note: The `eval_query` function is used below since it produces output + // in the same format as OPA. It also allows evaluating arbitrary statements + // as queries. + // + // Most applications will want to use `eval_rule` instead. + // It is faster since it does not have to parse the query string. + // It also returns the value of the rule directly and thus is easier + // to use. let results = engine.eval_query(query, enable_tracing)?; println!("{}", serde_json::to_string_pretty(&results)?);