MiniZinc / minizinc-js

Use MiniZinc in the browser or with NodeJS
https://js.minizinc.dev
Mozilla Public License 2.0
31 stars 8 forks source link

OR-tools support #4

Open kyliank opened 1 year ago

kyliank commented 1 year ago

Hi!

Is it currently possible to manually include Google OR-tools in the compilation of minizinc-js?

cyderize commented 1 year ago

Right now, the interface can only handle solvers which have a direct interface built into MiniZinc (this is because emulating the child process handling for FlatZinc solvers is rather difficult for WebAssembly/JS).

So you would have to add some code to MiniZinc which directly uses the OR-Tools library (theoretically this shouldn't be super difficult though).

kyliank commented 1 year ago

Thanks! When following the steps from: https://www.minizinc.org/doc-2.5.5/en/installation_detailed_wasm.html, to compile it as WebAssambly; I get the follow error: error: use emcmake rather then emconfigure for cmake projects

I did not change anything to the code yet, just latest code from GitHub. Using same command with emcmake did not fix the problem; any suggestions on how to compile correctly?

Dekker1 commented 1 year ago

That does indeed look out of date. We do actually use emcmake in our continuous integration builds: https://github.com/MiniZinc/libminizinc/blob/develop/.gitlab-ci.yml#L82-L104 Hopefully those can help instead.