17 releases

new 0.1.16 Oct 30, 2024
0.1.15 Oct 30, 2024
0.1.13 Apr 2, 2024
0.1.12 Mar 31, 2024
0.1.3 Feb 24, 2023

#2308 in Algorithms

Download history 265/week @ 2024-07-10 368/week @ 2024-07-17 510/week @ 2024-07-24 589/week @ 2024-07-31 566/week @ 2024-08-07 562/week @ 2024-08-14 494/week @ 2024-08-21 450/week @ 2024-08-28 547/week @ 2024-09-04 611/week @ 2024-09-11 497/week @ 2024-09-18 595/week @ 2024-09-25 438/week @ 2024-10-02 381/week @ 2024-10-09 392/week @ 2024-10-16 516/week @ 2024-10-23

1,855 downloads per month
Used in 4 crates (via russcip)

Apache-2.0

1.5MB
604 lines

scip-sys

tests

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

conda install --channel conda-forge scip

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

cargo add scip-sys --features bundled

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

cargo add scip-sys --features from-source

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

fn main() {
    let libscip_dir = std::env::var("DEP_SCIP_LIBDIR").unwrap();
    println!("cargo:rustc-link-arg=-Wl,-rpath,{}", libscip_dir);
}

License

This repo is distributed under the open-source Apache 2.0 license. Although, to simplify the building process the C-headers for the SCIPOptSuite and its dependent software are included. These dependencies include Bliss that is distributed under the GNU Lesser General Public license.

Dependencies