15 Packs: community add-ons
All Application Manual Name SummaryHelp

  • Documentation
    • Reference manual
      • Introduction
      • Overview
      • Initialising and Managing a Prolog Project
      • Built-in Predicates
      • SWI-Prolog extensions
      • Modules
      • Tabled execution (SLG resolution)
      • Constraint Logic Programming
      • CHR: Constraint Handling Rules
      • Multithreaded applications
      • Coroutining using Prolog engines
      • Foreign Language Interface
      • Using SWI-Prolog in your browser (WASM)
      • Deploying applications
      • Packs: community add-ons
        • Installing packs
        • Built-in predicates for attaching packs
        • library(prolog_pack): A package manager for Prolog
        • Structure of a pack
        • Developing a pack
      • The SWI-Prolog library
      • Hackers corner
      • Compatibility with other Prolog dialects
      • Glossary of Terms
      • SWI-Prolog License Conditions and Tools
      • Summary
      • Bibliography
    • Packages

15 Packs: community add-ons

SWI-Prolog has a mechanism for incorporating community extensions called packs. See the pack landing page for details and available packs. This chapter discusses how packages can be attached to the current Prolog process, how they can be installed as well as developing packages.

Packs are installed as self-containing directories that provide additional Prolog libraries and foreign modules, compiled native code plugins. In addition, a pack can define apps, command line tools that can be started using swipl app [args] (see section 2.11.1.5). Packs are searched as sub-directories of the Prolog search path pack. Initially, this search path is the user's App data, followed by the system's App data. The searched directories can be found using

?- absolute_file_name(pack(.), Path, [solutions(all)]).

The search path can be managed using the environment variable SWIPL_PACK_PATH, the -p command line option or using attach_packs/2.


Section Index


15.1 Installing packs
15.2 Built-in predicates for attaching packs
15.3 library(prolog_pack): A package manager for Prolog
15.4 Structure of a pack
15.5 Developing a pack
15.5.1 The pack meta data
15.5.1.1 Pack requirements on Prolog
15.5.2 Packs with foreign code
15.5.2.1 Compiling a foreign extension using a simple Makefile
15.5.2.2 Publishing a pack
15.5.2.3 Compiling a foreign extension using CMake
15.5.3 Updating a package