tpt-runtime
RustUnified workload runtime for Windows and heterogeneous compute — a common substrate for native, Linux, OCI, WASM, and AI workloads with capability-based security. Not a WSL clone.
Languages
TPT Runtime
A unified workload runtime for Windows and heterogeneous compute, providing a coherent execution, storage, networking, security, device, and observability environment for Windows, Linux, OCI, WASM, and TPT-native workloads.
tpt-runtime is not a WSL clone. Its goal is to provide a common workload substrate beneath Windows and Linux execution rather than making one pretend to be the other — so that native processes, containers, WASM modules, and AI workloads can be managed with the same lifecycle, resource, and capability model.
See SPEC.md for the full design specification, docs/ARCHITECTURE.md for the implemented architecture, and todo.md for the project checklist.
Status
MVP implemented (SPEC §43): Windows host daemon, tpt.runtime/v1 manifests, workload lifecycle, native Windows-process backend (Job Objects), WASM backend (wasmtime + WASI), logical volumes/networks, capability model, resource accounting, local named-pipe API, tpt CLI, structured events and observability. OCI support is complete end to end: image pull, layer unpacking, and a Windows isolation provider (tpt-runtime-sandbox) that runs bundles under job objects and restricted tokens. Linux runs through WSL.
The OCI provider runs Windows-based images and refuses Linux (ELF) ones, since Windows cannot execute them; see the sandbox README. Starting OCI workloads requires an elevated daemon.
Requires a Rust toolchain (stable, MSVC) to build. Windows is the primary host.
Quick start
cargo build --release -p tpt-runtime-cli -p tpt-runtime-daemon
tpt daemon start # background daemon (named pipe \\.\pipe\tpt-runtime-api)
tpt status # daemon status
tpt run --windows cmd.exe -- /C echo hello
tpt run --manifest examples/windows-echo.toml
tpt run --wasm examples/hello.wasm
tpt list
tpt inspect <workload-id>
tpt logs <workload-id>
tpt stop <workload-id>
tpt events --limit 30
tpt volume create project
tpt devices # GPUs discovered via nvidia-smi
tpt daemon stop
Project environments (SPEC §34): one tpt.toml describes a whole project's
workloads and their dependencies; tpt up starts them in dependency order,
tpt down stops them in reverse.
tpt init --template services # scaffold tpt.toml (minimal, services, wasm)
tpt up # start every workload, dependencies first
tpt up --only api # start one workload plus its dependencies
tpt down # stop and destroy the project's workloads
Every CLI command is a client of the daemon's local API; the wire protocol (newline-delimited JSON over a named pipe) is documented in docs/ARCHITECTURE.md.
Examples
Runnable manifests live in examples/, each annotated with what it demonstrates:
| File | Shows |
|---|---|
windows-echo.toml | the smallest useful manifest: one process, no network |
windows-service.toml | service mode, a fixed port, a volume, limits, labels |
windows-limited.toml | over-requests that policy denies or clamps |
windows-gpu.toml | a device request plus the matching capability |
windows-secret.toml | a secret held behind a capability, not an env var |
wasm-hello.toml | a WASM module bounded by fuel and a timeout |
Every example manifest is covered by a test in tpt-runtime-config, so the shipped examples cannot drift out of validity.
Crates
22 crates, layered so the workload model never depends on a backend. Each crate has its own README with runnable examples, and its own changelog.
Foundations
| Crate | Responsibility |
|---|---|
core | identifiers, lifecycle state machine, RuntimeError, RuntimeEvent, ResourceUsage |
model | WorkloadSpec, execution payloads, memory/network/device/volume models |
config | tpt.runtime/v1 TOML manifests, daemon settings |
Policy and access
| Crate | Responsibility |
|---|---|
capability | typed capability grants, revocation, checks |
policy | admission: hard/soft limits, GPU presence checks |
security | capability-gated secret store |
Backends
| Crate | Responsibility |
|---|---|
process | the ExecutionBackend / WorkloadInstance traits, log capture |
windows | Job Object isolation, kill-tree, env allowlist, job accounting |
wasm | wasmtime + WASI p1, fuel/epoch limits, preopened volumes |
oci | image references, bundle model, content store, isolation seam |
sandbox | Windows OCI isolation: job objects, restricted tokens |
linux | WSL-backed execution, layered strategy phase 1 |
Resources and observability
| Crate | Responsibility |
|---|---|
storage | logical volumes over host directories |
network | network intents and port allocation |
device | logical device registry, claims |
gpu | NVIDIA discovery via nvidia-smi |
observe | event hub (broadcast + JSONL), metrics registry |
Interfaces
| Crate | Responsibility |
|---|---|
ipc | request/response envelope, NDJSON framing |
api | named-pipe server, CLI client |
workload | lifecycle orchestration across backends |
daemon | assembles the stack, serves until shutdown |
cli | the tpt binary; a pure API client |
Development
cargo build --workspace
cargo test --workspace
cargo test -p tpt-runtime-config # also validates every example manifest
Related projects
tpt-archon— low-level substrate (storage, IPC, resources)tpt-boxcar— workload isolation, packaging, networking, sandboxingtpt-infer— inferencetpt-dsp— signal processingtpt-orchestra— multi-agent / repository orchestration
License
Licensed under either of
- MIT license (LICENSE-MIT)
- Apache License, Version 2.0 (LICENSE-APACHE)
at your option.
Copyright © 2026 TPT Solutions.