Skip to content

Locy Rust API Integration

Primary Entry Point

let locy = db.locy();

Core Methods

let compiled = db.locy().compile_only(program)?;
let result = db.locy().evaluate(program).await?;
let result = db.locy().evaluate_with_config(program, &cfg).await?;
let explain = db.locy().explain(program).await?;

Config (LocyConfig)

Common fields:

  • max_iterations
  • timeout
  • max_explain_depth
  • max_slg_depth
  • max_abduce_candidates
  • max_abduce_results
  • max_derived_bytes
  • deterministic_best_by

Result Shape (LocyResult)

  • derived: HashMap<String, Vec<Row>>
  • stats: LocyStats
  • command_results: Vec<CommandResult>

Helpers:

  • result.rows()
  • result.columns()
  • result.stats()

Full API References