Crate swipl

source ·
Expand description

swipl provides a high-level interface to SWI-Prolog. It allows you to write modules or foreign libraries which will be loaded by SWI-Prolog to to provide predicates written in rust. It can also be used to embed SWI-Prolog in a rust application.

The code in this crate is divided up into multiple modules. The easiest way to make use of it all is to use the prelude module, which re-exports the contents of all the other modules:

use swipl::prelude::*;

Modules

  • Prolog atoms.
  • Blob support.
  • Support for calling into prolog or prolog-like code.
  • Constants.
  • Prolog contexts.
  • Prolog dictionaries.
  • Prolog engines.
  • Re-export of the swipl-fli crate.
  • Prolog functors.
  • Prolog initialization logic.
  • Prolog modules.
  • Prolog predicates.
  • Module which re-exports all public symbols in this crate, for easy importing.
  • Records - prolog terms in heap storage.
  • Prolog results.
  • Prolog streams.
  • Prolog terms.
  • Support for easy text extraction from prolog.

Macros

Attribute Macros