https://github.com/minizinc/minizinc-playground
MiniZinc playground using WebAssembly
https://github.com/minizinc/minizinc-playground
constraint-programming integer-programming linear-programming minizinc optimisation-problem sat-solver
Last synced: 5 months ago
JSON representation
MiniZinc playground using WebAssembly
- Host: GitHub
- URL: https://github.com/minizinc/minizinc-playground
- Owner: MiniZinc
- License: mpl-2.0
- Created: 2023-03-12T21:56:59.000Z (over 2 years ago)
- Default Branch: develop
- Last Pushed: 2025-03-27T04:49:26.000Z (7 months ago)
- Last Synced: 2025-03-27T05:29:08.725Z (7 months ago)
- Topics: constraint-programming, integer-programming, linear-programming, minizinc, optimisation-problem, sat-solver
- Language: Svelte
- Homepage: https://play.minizinc.dev
- Size: 17.6 MB
- Stars: 9
- Watchers: 7
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MiniZinc Playground
Write and run MiniZinc models entirely within your browser.
Try it out at https://play.minizinc.dev.
The playground is a [Svelte](https://svelte.dev) app which uses the
[WebAssembly build of MiniZinc](https://github.com/minizinc/minizinc-js) to run MiniZinc locally in the browser.
The GUI is styled using [Bulma](https://bulma.io) and [CodeMirror](https://codemirror.net) is used for the code editor.## Sharing projects
The playground supports generating a link which opens the active project (including the current tab and solver settings) using the share button on the top-right. It may be useful to pass these through a link shortening service to get more friendly URLs.
### Loading code directly
You can also generate URLs which directly populate the playground with some code by using `#code=` as the URL hash.
For example: [`https://play.minizinc.dev/#code=var%201..3%3A%20x%3B`](https://play.minizinc.dev/#code=var%201..3%3A%20x%3B)
### Loading from a remote source
It's also possible to generate a link to load a project from a remote URL by using `#url=` as the hash.
For example: [`https://play.minizinc.dev/#url=https%3A%2F%2Fraw.githubusercontent.com%2FMiniZinc%2Flibminizinc%2Fmaster%2Fdocs%2Fen%2Fexamples%2Floan%2Floan.mzp`](https://play.minizinc.dev/#url=https%3A%2F%2Fraw.githubusercontent.com%2FMiniZinc%2Flibminizinc%2Fmaster%2Fdocs%2Fen%2Fexamples%2Floan%2Floan.mzp)
## Development
```sh
npm ci
npm run dev
```## Building
```sh
npm run build
```The playground application will be located in `./dist`.
If the application needs to be served from a subdirectory, set the environment variable `BASE_PATH` to the path when
building.