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
- Create a static atom.
- Create a static functor.
- Generate an inline callable predicate.
- Define foreign predicates written in rust for use in prolog.
- Define prolog predicates to be used from rust code.
- Generate a term from a rust expression.
- Easily implement TermGetable.
- Easily implement TermPutable.
- Easily implement Unifiable.
- Define a wrapped arc blob.
- Define a wrapped clone blob.
Attribute Macros
- Define an arc blob.
- Define a clone blob.