15 个版本

0.7.2 2023 年 10 月 2 日
0.7.1 2021 年 8 月 27 日
0.6.0 2020 年 6 月 5 日
0.5.1 2019 年 11 月 7 日
0.2.0 2017 年 5 月 4 日

#1806算法

44 每月下载量
用于 4 个包(通过 clingo

MIT 许可证

11MB
219K SLoC

C++ 152K SLoC // 0.1% comments · Rust 包仓库 C 35K SLoC // 0.0% comments · Rust 包仓库 Python 18K SLoC // 0.4% comments · Rust 包仓库 Rust 4K SLoC // 0.0% comments · Rust 包仓库 Solidity 4K SLoC · Rust 包仓库 Visual Studio Project 3K SLoC · Rust 包仓库 Bitbake 1K SLoC // 0.8% comments · Rust 包仓库 Bazel 680 SLoC // 0.2% comments · Rust 包仓库 Shell 555 SLoC // 0.4% comments · Rust 包仓库 Automake 421 SLoC // 0.2% comments · Rust 包仓库 M4 255 SLoC // 0.4% comments · Rust 包仓库 Visual Studio Solution 234 SLoC · Rust 包仓库 Batch 73 SLoC · Rust 包仓库 Xcode Config 33 SLoC // 0.7% comments · Rust 包仓库 PowerShell 13 SLoC // 0.1% comments · Rust 包仓库 Lua 10 SLoC · Rust 包仓库 JavaScript 2 SLoC · Rust 包仓库

包含 (晦涩的 autoconf 代码,7KB) configure.ac,(晦涩的 autoconf 代码,1KB) configure.ac,(晦涩的 autoconf 代码,3KB) configure.ac

clingo-sys 构建状态最新版本Rust 文档

Rust 原生 FFI 绑定到 clingo 库。Clingo 版本 5.6.2。

要求库

默认情况下,包通过动态链接使用 clingo 库。假定系统上已安装 clingo 动态库。您必须设置环境变量 CLINGO_LIBRARY_PATH。例如

export CLINGO_LIBRARY_PATH=/scratch/miniconda3/envs/test/lib

使用 static-linking

包定义了一个 Cargo 功能,允许通过静态链接使用 clingo 库。

使用可选的静态链接支持的建议方法如下。

[dependencies]
clingo-sys = { version = "0.7.2", features = ["static-linking"] }

要为静态链接构建 clingo,您需要安装以下工具

  • 一个符合 C++14 的编译器
    • 至少 GCC 版本 4.9
    • Clang 版本 3.1(使用 gcc 4.9 提供的 libstdc++ 或 libc++)
    • 至少 MSVC 15.0(《Visual Studio 2017)
    • 其他编译器可能也有效
  • cmake 建筑系统
    • 建议至少版本 3.18
    • 至少需要版本 3.1

依赖项