[package] name = "clarabel" version = "0.9.0" authors = ["Paul Goulart "] edition = "2021" rust-version = "1.66" license = "Apache-2.0" description = "Clarabel Conic Interior Point Solver for Rust / Python" readme = "README.md" repository = "https://github.com/oxfordcontrol/Clarabel.rs" keywords = ["convex", "optimization", "conic", "solver", "linear-programming"] categories = ["mathematics"] #required for openssl to work on git actions resolver = "1" [dependencies] lazy_static = "1.4" num-traits = "0.2" derive_builder = "0.11" enum_dispatch = "0.3.8" amd = "0.2.2" thiserror = "1.0" cfg-if = "1.0" itertools = "0.11" # ------------------------------- # features # ------------------------------- [features] default = ["serde"] # enable reading / writing of problems from json files serde = ["dep:serde", "dep:serde_json"] # enables blas/lapack for SDP support, with blas/lapack src unspecified # also enable packages required for chordal decomposition sdp = ["blas","lapack", "indexmap"] # explicit configuration options for different blas flavours sdp-accelerate = ["sdp", "blas-src/accelerate", "lapack-src/accelerate"] sdp-netlib = ["sdp", "blas-src/netlib", "lapack-src/netlib"] sdp-openblas = ["sdp", "blas-src/openblas", "lapack-src/openblas"] sdp-mkl = ["sdp", "blas-src/intel-mkl", "lapack-src/intel-mkl"] sdp-r = ["sdp", "blas-src/r", "lapack-src/r"] # build as the julia interface julia = ["sdp", "dep:libc", "dep:num-derive", "serde", "faer-sparse"] # build as the python interface via maturin. # NB: python builds use scipy shared libraries # for blas/lapack, and should *not* explicitly # enable a blas/lapack source package python = ["sdp", "dep:libc", "dep:pyo3", "dep:num-derive", "serde", "faer-sparse"] wasm = ["dep:web-time"] #compile with faer supernodal solver option faer-sparse = ["dep:faer", "dep:faer-entity"] # ------------------------------- # SDP configuration # ------------------------------- [dependencies.blas] version = "0.22.0" optional = true [dependencies.lapack] version = "0.19.0" optional = true [dependencies.blas-src] version = "0.10" optional = true [dependencies.lapack-src] version = "0.10" optional = true [dependencies.indexmap] version = "2.2" optional = true [dependencies.faer] version = "0.19" optional = true [dependencies.faer-entity] version = "0.19" optional = true # ------------------------------- # examples # ------------------------------- [[example]] name = "lp" path = "examples/rust/example_lp.rs" [[example]] name = "qp" path = "examples/rust/example_qp.rs" [[example]] name = "socp" path = "examples/rust/example_socp.rs" [[example]] name = "powcone" path = "examples/rust/example_powcone.rs" [[example]] name = "expcone" path = "examples/rust/example_expcone.rs" [[example]] name = "box" path = "examples/rust/example_box.rs" [[example]] name = "sdp" path = "examples/rust/example_sdp.rs" required-features = ["sdp"] [[example]] name = "box_faer" path = "examples/rust/example_box_faer.rs" required-features = ["faer-sparse"] [[example]] name = "json" path = "examples/rust/example_json.rs" required-features = ["serde"] # ------------------------------- # custom build profiles # ------------------------------- [profile.release-with-debug] inherits = "release" debug = true # ------------------------------ # Optional julia and python interface # ------------------------------ [dependencies.num-derive] optional = true version = "0.2" [dependencies.serde] optional = true version = "1" features = ["derive"] [dependencies.serde_json] optional = true version = "1" [dependencies.libc] optional = true version = "0.2" [dependencies.pyo3] optional = true version = "0.20" # "extension-module" tells pyo3 we want to build an extension module (skips linking against libpython.so) # "abi3-py37" tells pyo3 (and maturin) to build using the stable ABI with minimum Python version 3.7 features = ["extension-module", "abi3-py37"] [lib] name = "clarabel" # "cdylib" is necessary to produce a shared libraries for Python/Julia # "lib" is necessary to allow the ./examples to build crate-type = ["lib","cdylib"] # ------------------------------ # enable latex in docs # credit: https://github.com/victe/rust-latex-doc-minimal-example # ------------------------------ [package.metadata.docs.rs] rustdoc-args = [ "--html-in-header", "./html/rustdocs-header.html" ] features = ["sdp","sdp-mkl"] # ------------------------------ # wasm compatibility # ------------------------------ [dependencies.web-time] optional = true version = "0.2.3" # ------------------------------ # testing, benchmarking etc # ------------------------------ [dev-dependencies] tempfile = "3"