-
Notifications
You must be signed in to change notification settings - Fork 24
/
Cargo.toml
207 lines (157 loc) · 4.68 KB
/
Cargo.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
[package]
name = "clarabel"
version = "0.9.0"
authors = ["Paul Goulart <[email protected]>"]
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"