scip-sys
Raw rust bindings to SCIP's C-API. The bindings are automatically generated using bindgen. Meant to provide full control over SCIP's API, for a more restricted memory-safe API see russcip.
Dependencies
This crate depends on SCIP at runtime, the crate provides optional features (bundled, from-source) to install SCIP.
If no feature is enabled, it will look for a scip installation in the current conda environment, if it is not found it will look for the SCIPOPTDIR environment variable.
to install SCIP using conda run the following command
bundled feature
The crate provides the bundled feature that tries to download a precompiled binary for your OS and architecture
run the following command to add the crate with the bundled feature
Because the bundled SCIP release is pinned, the bindings are deterministic per
platform and are shipped prebuilt in src/bindings/. The default build still
keeps bindgen enabled (the system/SCIPOPTDIR/from-source paths need it),
but the bundled path uses the prebuilt bindings and never runs bindgen. For
the leanest build, disable default features to drop bindgen (and its
libclang requirement) entirely:
The prebuilt bindings are regenerated per platform by the generate-bindings
GitHub Actions workflow; a CI check fails if they drift from the pinned release.
from-source feature
The crate provides the from-source feature that tries to download the source code and compile it. This provides the most flexibility but the compilation process can be slow.
run the following command to add the crate with the from-source feature
Finding libscip at runtime
scip-sys will emit the path where it found libscip in the environment variable DEP_SCIP_LIBDIR at build time.
You can use this variable to find the path to the shared library at runtime. You can do so by adding the following to your build.rs
License
This repo is distributed under the open-source Apache 2.0 license.