Crates.io | cargo-swipl |
lib.rs | cargo-swipl |
version | 0.3.4 |
source | src |
created_at | 2021-04-30 07:18:06.529248 |
updated_at | 2023-08-03 07:33:31.763243 |
description | Tool for working with crates that use the SWI-Prolog Foreign Language Interface |
homepage | |
repository | https://github.com/terminusdb-labs/swipl-rs/ |
max_upload_size | |
id | 391450 |
size | 12,251 |
cargo-swipl is a tool to make working with crates that depend on swipl-rs easier.
swipl-rs dependent crates will be linked against the SWI-Prolog system specified in the SWIPL
variable, or if that's not specified, the version of SWI-Prolog that is found on the path. However, at run time, if SWI-Prolog's shared library is not discoverable, the resulting binary will fail to start.
cargo-swipl provides a wrapper around cargo run
and cargo test
, namely cargo swipl run
and cargo swipl test
, which sets up your environment so that the required dependencies will be discovered. They take all the arguments that their respective cargo commands would take, and will return with the same status code.
Run the main binary:
cargo swipl run
Run the tests:
cargo swipl test
Explicitely specify the SWI-Prolog version to run with:
SWIPL=~/.swivm/versions/v8.2.4/bin/swipl cargo swipl run