choco-solver-sys 0.1.0

FFI interface for the Choco Solver library DLL generated by GraalVM Native Image.
Documentation
  • Coverage
  • 0.19%
    1 out of 523 items documented1 out of 1 items with examples
  • Size
  • Source code size: 588.18 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 11.52 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 33s Average build duration of successful builds.
  • all releases: 33s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • pellico

choco-solver-sys

Low-level Rust FFI bindings for the Choco Solver native C API (libchoco_capi).

This crate is the unsafe boundary used by the higher-level choco4 API. Most users should prefer the top-level crate instead of using this crate directly.

What This Crate Contains

  • src/bindings.rs: auto-generated bindgen output for libchoco_capi.h
  • Dynamic symbol loader was generated by bindgen (libchoco_capi struct)
  • Re-exported raw C types/functions from src/lib.rs

How to build libchoco_capi.dll

Checkout BUILDING.md file in the repository of this package or check choco-solver-capi repository

Minimal Usage Example

use choco_solver_sys::libchoco_capi;

fn main() -> Result<(), Box<dyn std::error::Error>> {
		// Adjust to the actual path if the DLL is not located
		// in the standard search paths of your OS.
		let lib = unsafe { libchoco_capi::new("libchoco_capi.dll")? };

		// Access loaded function pointers from `lib` here.
		let _ = lib.graal_create_isolate.as_ref()?;
		Ok(())
}

License

Dual licensed under MIT and BSD-3-Clause (see LICENSE.txt).