The goal is to make the Presolve workflow concrete before introducing its formal vocabulary. By the end, you should be able to answer three practical questions: what am I shipping, can this environment run it, and what will Presolve use there?
Prerequisites.
You do not need to compile Presolve itself. The CLI is distributed as a native release binary. This walkthrough does use Presolve's current Rust example, so Rust is only required to build that example application.
| Tool | Why you need it | Check |
|---|---|---|
| Git | Clone the example source used by this walkthrough | git --version |
| Rust + Cargo | Build the Rust example application, not the Presolve CLI | cargo --version |
wasm32-wasip2 target | Build the example WebAssembly Component | rustup target add wasm32-wasip2 |
Install Presolve.
macOS or Linux
curl -fsSL https://presolve.dev/install.sh | sh
presolve --versionThe installer detects your operating system and CPU architecture, downloads the matching GitHub Release archive, verifies its SHA-256 checksum, installs the CLI under ~/.presolve/bin, and adds that directory to your shell PATH when needed.
Windows PowerShell
irm https://presolve.dev/install.ps1 | iex
presolve --versionThe Windows installer downloads the native x86_64 release, verifies its SHA-256 checksum, installs presolve.exe under your user profile, and adds the directory to your user PATH. Open a new terminal if your existing shell does not immediately see the updated PATH.
v0.1.0-alpha.1. Advanced users can set PRESOLVE_VERSION to install a specific published version.Build from source
Building the CLI from source is still supported for contributors and compiler/runtime development, but it is not part of normal Presolve installation. See the CLI reference.
Open the KV example.
git clone https://github.com/fierstdev/presolve.git
cd presolve/examples/kv-demo
lsYou are cloning the repository here only because this tutorial uses its example application. The installed presolve command remains the released CLI binary from Step 1.
The directory contains normal application source plus presolve.toml. That file tells Presolve what the application is and what it requires. For this example, the important requirement is key-value storage.
The code that implements the example's behavior.
presolve.tomlThe portable description of what the application needs to run.
You can inspect the application before any environment exists:
presolve inspectUse this whenever you want to verify what Presolve understands from the application definition without mixing in deployment choices.
Create a local environment.
An application says what it needs. An environment says what is available here. For local development, create an environment beside the example and add an in-memory KV provider:
presolve env init local-dev
presolve env provider add memory-services --provides kv
presolve env show
presolve env checkThis creates presolve.env.toml. The generated environment has a stable identity, explicit execution support, resource capacity, and the KV service you just declared.
Why this is separate from the app
The example still asks for key-value storage. It does not need to know that this environment satisfies that need with an in-memory provider. A different environment can satisfy the same requirement with Redis or Cloudflare KV.
presolve env check validates the environment file itself. It does not yet answer whether this particular application can run there. That is the job of presolve check.Build the application once.
presolve buildThe current Rust authoring path builds the example Component and packages the application into a .presolved release under dist/.
You should see output identifying both the release path and its digest. Conceptually, this is the thing you ship:
dist/kv-demo.presolved
sha256:…Presolve does not need the local environment in order to decide what this release is. The build remains separate from environment selection.
Inspect the detached release
presolve inspect dist/kv-demo.presolvedThis reads the application definition back from the packaged release. It is useful when the source tree is no longer present or when you want to confirm exactly what was packaged.
Ask whether the environment can run it.
presolve checkPresolve compares the application's requirements with the local environment. In this walkthrough, the KV requirement should match the memory-services provider.
A successful result means the environment can satisfy the mandatory requirements represented by the current model. If something is missing, Presolve returns a structured diagnostic instead of silently choosing a weaker fallback.
Try the failure mode
To understand what Presolve is protecting you from, remove the provider, run the check, then add it back:
presolve env provider remove memory-services
presolve check
presolve env provider add memory-services --provides kv
presolve checkThe first check should reject the environment because the app still requires KV storage. The second should return to a compatible state.
Inspect what Presolve selected.
presolve plancheck answers whether the match is possible. plan shows the actual result of that match: the environment identity, workloads, selected provider identities, versions, and negotiated features.
The application does not name an infrastructure vendor.
The environment declares concrete supply.
You can inspect the selected provider before runtime materialization.
Machine-readable output
For CI, automation, editors, and higher-level tooling, use the versioned JSON projection:
presolve inspect --json
presolve check --json
presolve plan --jsonDo not scrape human output when a machine-readable form is available.
Run the app locally.
presolve dev --input "hello"The local development path resolves the same application/environment boundary, realizes the selected local provider implementation, assembles the runtime, and invokes the Component.
The important separation remains intact: the app asked for KV semantics, the environment supplied a provider, the plan selected it, and only then did the local node materialize the implementation.
You now know the core workflow.
| You want to know… | Use… | Plain meaning |
|---|---|---|
| What does my app need? | presolve inspect | Read the app definition without choosing infrastructure. |
| What exact application am I shipping? | presolve build | Create the portable .presolved release. |
| Can this environment run it? | presolve check | Validate compatibility before execution. |
| What did Presolve choose? | presolve plan | Inspect the selected runtime/provider bindings. |
| Can I run it locally? | presolve dev | Resolve, materialize local providers, and execute. |
Everything deeper in the documentation explains one of these steps in more detail.
Common first-run problems.
presolve: command not found
Open a new terminal after installation. On macOS/Linux, the installer uses ~/.presolve/bin; if needed for the current shell, run export PATH="$HOME/.presolve/bin:$PATH". On Windows, open a new PowerShell or terminal so it inherits the updated user PATH.
The installer returns a 404
The requested Presolve release is not published for your platform/version. Check the project's GitHub Releases page and confirm that the requested version has a native archive for your target.
The WebAssembly target is missing
Install it with rustup target add wasm32-wasip2, then retry presolve build. This target is required by the example application, not by the Presolve CLI itself.
No environment is found
Run presolve env init in the example directory or a parent directory. Presolve searches upward for the nearest presolve.env.toml.
presolve check reports a missing capability
The application requires a service the environment does not currently advertise. For this guide, confirm that presolve env provider list contains a provider offering KV.
The environment validates, but the app is still rejected
presolve env check only validates the environment declaration. Use presolve check to evaluate the application against it. A valid environment can still be incompatible with a particular application.