rust-or / highs-sys

Rust binding for the HiGHS linear programming solver
https://docs.rs/highs-sys
10 stars 16 forks source link

Link libz to enable read/writeModel to mps files. #10

Closed Thell closed 1 year ago

Thell commented 1 year ago

I have no clue what the 'right' way is to link libz to be cross-platform but I really wanted to have access to the readModel and writeModel and thought others might too.

lovasoa commented 1 year ago

Don't you also need to add something to https://github.com/rust-or/highs-sys/blob/master/install-dependencies.sh ?

Thell commented 1 year ago

Don't you also need to add something to https://github.com/rust-or/highs-sys/blob/master/install-dependencies.sh ?

I think zlib1g(-dev) is a dependency of gcc and the install-dependencies doesn't support Windows so it wouldn't be needed there either. On Windows it needs to be found though and CMake will find it if ZLIB_ROOT is set.

Thell commented 1 year ago

As for the failing pull request tests, I wasn't aware it would follow my branch instead of pinning to the commit the request was made from. I can make a new branch just for the pull request if you want.

lovasoa commented 1 year ago

Hi! Yes, pull requests follow the branch they come from, this allows you to iterate on your pr. You can open a pr with just the zlib change, put the new feature behind a feature flag to avoid breaking compilation for existing users without zlib, fix the ci, and I'll merge.