Skip to content
Back to search

rusolve

MarketplaceWorks with Claude CodeGitHub

Agent playbooks for the rusolve optimization solver

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/creait-nl--rusolve/badge.svg)](/listings/creait-nl--rusolve)

HTML

<a href="/listings/creait-nl--rusolve"><img src="/api/listings/creait-nl--rusolve/badge.svg" alt="findsafeskills safety rating" /></a>

Install

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

From source (works today; needs a Rust toolchain):

git clone https://github.com/CREAIT-nl/rusolve && cd rusolve cargo build --release -p rusolve-cli # the solver binary: target/release/rusolve-cli

Python package (3.11 or newer; the wheel bundles the CLI and the MCP server):

pip install maturin && tools/build_wheel.sh # writes the wheel to dist-wheels/ pip install dist-wheels/rusolve-*.whl

After the first release this becomes `pip install rusolve`, or `uvx --from rusolve rusolve mcp` to run the MCP server without installing.

The CLI is called `rusolve-cli` when built with cargo and `rusolve` when installed from the wheel. The examples below use `rusolve`.

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

.claude-plugin/marketplace.json · Manifest · 14 lines
  1. {
  2. "name": "rusolve",
  3. "owner": {
  4. "name": "rusolve contributors"
  5. },
  6. "plugins": [
  7. {
  8. "name": "rusolve-skills",
  9. "source": "./",
  10. "description": "Playbook skills for formulating, solving, debugging and tuning models with rusolve"
  11. }
  12. ],
  13. "description": "Agent playbooks for the rusolve optimization solver"
  14. }
README.md · README · 122 lines
  1. # rusolve
  2. An LP and MIP solver in Rust, built to be used by people and by AI agents.
  3. rusolve starts from a faithful Rust port of [HiGHS](https://highs.dev): its dual simplex,
  4. interior point, presolve and branch-and-cut are translated function by function and checked
  5. against HiGHS itself. On top of that base it adds techniques from the optimization literature
  6. and from other permissively licensed solvers (SCIP, Clarabel, and others, credited in
  7. [`THIRD_PARTY_NOTICES.md`](THIRD_PARTY_NOTICES.md)). It is also designed for AI agents: every
  8. command can return JSON, every error has a code and an explanation, and an MCP server is built
  9. in.
  10. **Status:** early (0.1.0), not yet on PyPI. LP and MIP are the core. Convex quadratic
  11. objectives and semi-continuous variables are supported. Interfaces may still change.
  12. ## Install
  13. From source (works today; needs a Rust toolchain):
  14. git clone https://github.com/CREAIT-nl/rusolve && cd rusolve
  15. cargo build --release -p rusolve-cli # the solver binary: target/release/rusolve-cli
  16. Python package (3.11 or newer; the wheel bundles the CLI and the MCP server):
  17. pip install maturin && tools/build_wheel.sh # writes the wheel to dist-wheels/
  18. pip install dist-wheels/rusolve-*.whl
  19. After the first release this becomes `pip install rusolve`, or `uvx --from rusolve rusolve mcp`
  20. to run the MCP server without installing.
  21. The CLI is called `rusolve-cli` when built with cargo and `rusolve` when installed from the
  22. wheel. The examples below use `rusolve`.
  23. ## Quick start
  24. Python:
  25. ```python
  26. import rusolve as rs
  27. m = rs.Model()
  28. x = m.add_vars(3, binary=True)
  29. m.add_constr(x[0] + x[1] + x[2] <= 2)
  30. m.maximize(5 * x[0] + 4 * x[1] + 3 * x[2])
  31. sol = m.solve(time_limit=60)
  32. print(sol.status, sol.objective) # Optimal 9.0
  33. ```
  34. More in [`crates/rusolve-py/README.md`](crates/rusolve-py/README.md): bulk data and sparse
  35. matrices, warm re-solves after changes, callbacks, and SciPy- and highspy-compatible layers.
  36. Command line (MPS and LP files, optionally compressed):
  37. rusolve mip model.mps --format json --solution # solve, result as one JSON object
  38. rusolve explain model.mps # why is it infeasible? (an IIS, by name)
  39. rusolve feasrelax model.mps --mode min-count # the cheapest repair
  40. rusolve check model.mps solution.json # which constraints a solution violates
  41. rusolve lint model.mps # big-M values, scaling, modelling smells
  42. rusolve options # every option, its range and default
  43. `rusolve --help` lists all commands.
  44. ## Diagnostics
  45. Problems with a model or a command come back as coded diagnostics, in the style of `rustc`:
  46. warning[RS2001]: big-m: row 'c1': coefficient -1e6 on binary 'b' is far larger in magnitude than the tightest valid value -5
  47. --> row 'c1'
  48. = row: c1: x - 1e6 b <= 0
  49. = help: set the coefficient of b in c1 to -5 and the upper bound to 0 (was -1000000 and 0)
  50. `rusolve --explain RS2001` explains any code. With `--format json`, the same diagnostics are
  51. part of the JSON output. The list of codes is in
  52. [`docs/agent/diagnostics.md`](docs/agent/diagnostics.md).
  53. Conventions: `--format json` prints exactly one JSON object on stdout (logs go to stderr);
  54. schemas are in [`docs/schema/`](docs/schema). Exit codes: 0 ran (the solve status is in the
  55. output), 2 usage error, 3 input error, 4 internal error. A misspelled option or `RUSOLVE_*`
  56. variable is an error that suggests the nearest valid name.
  57. ## For AI agents
  58. - **MCP server** (stdio): `claude mcp add rusolve -- /path/to/rusolve-cli mcp`, or in any MCP
  59. client `{"mcpServers": {"rusolve": {"command": "/path/to/rusolve-cli", "args": ["mcp"]}}}`.
  60. Tools: `load_model`, `build_model`, `solve`, `get_solution`, `modify`, `check_solution`,
  61. `explain`, `lint`, `ranging`, `feasrelax`, `free_model`. Design:
  62. [`docs/design/mcp.md`](docs/design/mcp.md).
  63. - **Entry point:** [`llms.txt`](llms.txt). Full generated reference of commands, MCP tools,
  64. options and environment variables: [`docs/agent/reference.md`](docs/agent/reference.md).
  65. - **Skills:** task recipes in [`docs/skills/`](docs/skills) (start with `start-here`, then
  66. `solve`, `debug-infeasible`, `tune`, `extend`, and playbooks for common model classes such as
  67. scheduling, routing, lot sizing and facility location). The folder is also a Claude Code plugin
  68. (`.claude-plugin/`).
  69. - **Evaluations:** [`evals/`](evals) measures how well agents use all of this.
  70. ## Documentation
  71. [`docs/README.md`](docs/README.md) is the index.
  72. ## Contributing
  73. Contributions are welcome, including AI-assisted ones. See [`CONTRIBUTING.md`](CONTRIBUTING.md).
  74. Agents start at [`AGENTS.md`](AGENTS.md).
  75. ## License
  76. Copyright 2026 CREAIT. rusolve is source-available under the [Business Source License 1.1](LICENSE).
  77. In short:
  78. - **Free:** reading, modifying, forking and redistributing the code; research, teaching,
  79. testing and evaluation; and production use to solve your own (or your company's) optimization
  80. problems.
  81. - **Needs a commercial license:** using rusolve to provide optimization to others, as a
  82. product, a hosted service or consulting. Contact [CREAIT](https://creait.nl).
  83. - **Becomes open source:** each release converts to the GNU AGPL v3 four years after it is
  84. published.
  85. [`LICENSING.md`](LICENSING.md) answers the common questions (can my company use it in
  86. production? can we sell a product built on it?). The [license text](LICENSE) is what applies.
  87. rusolve contains code translated from HiGHS (MIT) and other permissively licensed projects; their notices
  88. are in [`THIRD_PARTY_NOTICES.md`](THIRD_PARTY_NOTICES.md).

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.