Define your application

Describe the application, not the infrastructure.

presolve.toml is the versioned, environment-independent declaration of what your application is and what it needs to run.

Docs / Define your application

The application definition answers one question: what must remain true about this application regardless of where it eventually runs?

Complete example

A multi-capability application.

contract_version = "0.1"

[application]
name = "orders"
version = "1.0.0"
description = "Example order-processing application"

[[workloads]]
name = "api"
kind = "component"

[[workloads]]
name = "worker"
kind = "component"

[[interfaces]]
name = "jobs"
kind = "event"

[[relationships]]
from = "api"
to = "worker"
interface = "jobs"

[[capabilities]]
interface = "presolve:kv/store"
version = "^0.1"

[[capabilities]]
interface = "presolve:objects/store"
version = "^0.1"
preferred_features = ["range-read"]

[[capabilities]]
interface = "presolve:sql/database"
version = "^0.1"

[[capabilities]]
interface = "presolve:queue/work-queue"
version = "^0.1"

[resources]
memory_mib = 256
cpu_millis = 500

[network]
outbound = "deny"

Nothing above selects Redis, PostgreSQL, S3, Cloudflare, a filesystem path, a cloud account, or a deployment region. Those are environment/runtime concerns.

Schema 0.1

What the application definition can express.

SectionPurposeExamples
[application]Stable application metadataname · version · description
[[workloads]]Logical executable parts of the appComponent · container
[[interfaces]]Application-local communication semanticsrequest_response · event
[[relationships]]Topology between workloadsapi → worker over jobs
[[capabilities]]External service/behavior requirementsKV · objects · SQL · queue
[resources]Minimum runtime requirementsmemory_mib · cpu_millis
[network]Outbound application policydeny · allow_list · allow_all
Workloads

Logical execution units belong to the application.

Component

A WebAssembly Component workload. Component artifacts can be embedded directly in the built release.

Container

An OCI-compatible workload whose immutable descriptor identity is represented by the release without embedding registry location or credentials.

Artifact build paths, registry URLs, placement, node names, and provider configuration do not belong in the application definition.

Capabilities

Declare service semantics and version compatibility.

[[capabilities]]
interface = "presolve:sql/database"
version = "^0.1"
optional = false
required_features = ["dialect-postgresql"]
preferred_features = ["returning"]

required_features are hard compatibility constraints. preferred_features influence provider ranking but do not make an otherwise-compatible environment invalid. optional = true permits a capability to remain unbound.

Read the capability reference →

Topology

Describe relationships without choosing transport.

workloadapi
→
interfacejobsevent
→
workloadworker

The relationship says the application has this communication shape. It does not require HTTP, a queue product, a service mesh, or another transport unless those semantics are separately declared.

Network policy

Outbound access is application intent.

[network]
outbound = "allow_list"
allow = ["api.example.com", "storage.example.com:443"]

Targets are hosts or host-and-port values, not URLs. The default is deny.

Boundary

What belongs here?

Yes — application semantics
  • workload classes
  • service/capability requirements
  • required/preferred semantic features
  • minimum resource requirements
  • network policy
  • application-local topology
No — deployment details
  • environment selection
  • provider IDs
  • provider credentials
  • service endpoints
  • database paths
  • registry location or placement
If changing an environment would force you to edit presolve.toml even though the application's behavior and requirements did not change, that is a portability-boundary smell.
Validation

Invalid application definitions fail loudly.

Unknown fields are rejected. Presolve validates naming, workload and interface references, capability identifiers/versions/features, resource values, network policy, duplicate declarations, and topology invariants before normalization.

presolve inspect
presolve build
presolve check
presolve plan
Canonical schema reference on GitHub ↗
Continue

Now describe where the app could run.