Concepts
Pipeline overviewUnderstand the engine's model before choosing a C, Python, or JavaScript integration surface.RegistriesDefine the closed predicate vocabulary that policies are allowed to use.ManifestsLoad policy sources through an integrity-checked, fail-closed deployment manifest.RulesetsWork with the parsed, reusable policy program consumed by the solver.Runtime EDBSupply a complete snapshot of request facts to one bounded policy evaluation.SolvingEvaluate a ruleset and runtime facts into a bounded set of derived conclusions.QueryingInspect exact facts in a solved result, then optionally explain their presence or absence.ExplanationsRead a witness or a bounded refutation after a successful membership answer.Event windowsKeep a bounded history of events or groups, with replaceable static context and explicit expiration.
C API
OverviewIntegrate Maelys Datalog through its stable opaque C API and explicit ownership model.Define a domainUse the C registries API: ownership, explanations and complete examples.Load and inspect policiesUse the C manifests API: ownership, explanations and complete examples. Use the C rulesets API: ownership, explanations and complete examples.Provide input factsUse the C runtime edb API: ownership, explanations and complete examples.Prepare and run a sessionUse the C solving API: ownership, explanations and complete examples.Session resourcesChoose session capacities and initialize a session in application-provided memory.Event windowsKeep the last events or groups of facts, expire them explicitly and compare the resulting answers.ProgramInspect the compiled policy, admitted queries and normalized program before processing input.Structured explanationsRead document-access proofs and refusal obstacles as data, one step at a time.Read and explain resultsUse the C querying API: ownership, explanations and complete examples.ErrorsUse the C errors API: ownership, explanations and complete examples.Full programComplete document-access program for the C API, with checked C source.
Detailed API
DomainDeclare and register a closed domain through the stable opaque C API.PolicyLoad inline policies or governed manifests into an opaque policy set. Select and identify policies without exposing parsed ruleset structures.Input EDBBuild complete request fact sets with the stable opaque input buffer.SessionPrepare an opaque C session and solve independent request snapshots.Session inputsAttach fixed-vocabulary retained input to a session in caller-owned storage.Session resourcesExplicit session capacities, caller-owned storage and caller allocation.Event windowsRetain the last events or groups of facts, update their solved snapshot and expire timed input explicitly.ProgramInspect the compiled program, permitted queries and normalized rules of a loaded policy.Structured explanationsInspect prepared proofs, supporting premises and refusal obstacles as records.ResultQuery results, enumerate relations, and render explanations through the stable C facade.DecisionsCompose a decision from checked query-presence bits.ErrorsInterpret stable C status values and public diagnostics fail-closed.
C Extension API
OverviewHeaders for native extension and component authors.FrontendsCompile a grant command and evaluate its document-access rule.Native modulesLoad a document policy with a native filter, planner and deferred domain.Extension registrationRegister a document-access frontend, filter and planner in one context.BackendsWrite and execute native backend callbacks for document-access decisions.
Detailed API
FrontendsTranslate a native policy format into validated facts and rules.Native modulesImplement trusted native filters, join planners and deferred domain installers.Extension registrationBundle native components and select them through a sealed context.BackendsImplement snapshot, resource-aware and retained-input native solvers with explicit commit and abort.
Python
OverviewUse the unified Python binding built on the installed opaque C SDK.RegistriesUsage guide and preserved examples for registries in Python.ManifestsLoad policies from inline source or verified manifests with the Python binding.RulesetsUsage guide and preserved examples for rulesets in Python.Runtime EDBUsage guide and preserved examples for runtime edb in Python.SolvingUsage guide and preserved examples for solving in Python.QueryingUsage guide and preserved examples for querying in Python.ErrorsUsage guide and preserved examples for errors in Python.Full programExamples in the unified Python binding.Reference contextsSource files for executed Python card examples.
Detailed API
EngineEngine class and public members in the unified Python API.PredicatePredicate class and public members in the unified Python API.RulesetRuleset class and public members in the unified Python API.EdbEdb class and public members in the unified Python API.SessionSession class and public members in the unified Python API.InputBaseExact retained-input bases in the unified Python API.SessionInputsRetained session input in the unified Python API.SolveResultSolveResult class and public members in the unified Python API.ResultTermResultTerm class and public members in the unified Python API.MaelysDatalogErrorMaelysDatalogError class and public members in the unified Python API.LimitsLimits class and public members in the unified Python API.ProgramCountsProgramCounts class and public members in the unified Python API.SessionCapacitiesSessionCapacities class and public members in the unified Python API.DiagnosticDiagnostic class and public members in the unified Python API.StatusStatus class and enum members in the unified Python API.CapabilityCapability class and enum members in the unified Python API.ExplanationKindExplanationKind class and enum members in the unified Python API.
TypeScript / JS
OverviewCommon JavaScript and TypeScript API for native Node and WebAssembly.RegistriesExamples and practical guidance for the JavaScript and TypeScript Predicate API.ManifestsCommon JavaScript and TypeScript API for native Node and WebAssembly.RulesetsExamples and practical guidance for the JavaScript and TypeScript Ruleset API.Runtime EDBExamples and practical guidance for the JavaScript and TypeScript Edb API.SolvingExamples and practical guidance for the JavaScript and TypeScript Session API.QueryingExamples and practical guidance for the JavaScript and TypeScript SolveResult API.ErrorsExamples and practical guidance for the JavaScript and TypeScript MaelysDatalogError API.Full programCommon JavaScript and TypeScript API for native Node and WebAssembly.
Detailed API
EngineEngine class and methods for the common JavaScript and TypeScript API.PredicatePredicate class, factory methods and registry declarations.RulesetRuleset class and methods for compiled policies.EdbEdb class, methods and runtime fact types.SessionSession capacity and execution classes with their methods.Session inputsRetained dynamic input, fixed storage options and exact base tokens.ResultTerm and SolveResultResult term and solve result classes with their methods.MaelysDatalogErrorError class, status values and diagnostics.WASM integrationOptional Emscripten module contract for a custom JavaScript WASM factory.
Performance
Testing
Background
Changelog
Deprecated
Compare bindingsChoose between native C, Python, and JavaScript/TypeScript integration surfaces.Advanced quick start · 0.9.1Understand the transparent alpha API and the engine lifecycle beneath the stable facade.Performance · historicalCompare native engine memory and versioned timing datasets without mixing in binding costs.
C Low-level API
OverviewUnderstand the transparent low-level C surface retained for existing consumers and engine extensions.RegistriesLow-level C operations for registries; concepts and integration code are documented separately.ManifestsLow-level C operations for manifest; concepts and integration code are documented separately.RulesetsLow-level C operations for rulesets; concepts and integration code are documented separately.Runtime EDBLow-level C operations for edb; concepts and integration code are documented separately.SolvingLow-level C operations for solving; concepts and integration code are documented separately.QueryingLow-level C operations for querying; concepts and integration code are documented separately.ErrorsLegacy native result codes and detailed low-level diagnostics.Full programComplete document-access program for the C Low-level API, with checked C source.
Python API V1
OverviewUse the historical Python binding backed by the native C shim.RegistriesRegistries in the Python V1 binding.ManifestsManifests in the Python V1 binding.RulesetsRulesets in the Python V1 binding.Runtime EDBRuntime EDB in the Python V1 binding.SolvingSolving in the Python V1 binding.QueryingQuerying in the Python V1 binding.ErrorsErrors in the Python V1 binding.Complete exampleComplete examples in the Python V1 binding.