# RustSy Process Graph
RustSy Process Graph runs a named dependency graph of local commands. It provides worker and memory admission, verified artifact caching, cancellation, timeouts, and JSON or Perfetto-compatible reports. It needs no GPU. The executable is `rustsy-process`. The existing compute SDK and its `rustsy` command are separate packages.
## Quick start
Install using Rust 1.92 or newer. On Windows, use the MSVC x64 toolchain.
```sh
cargo install rustsy-process --version 0.2.0-alpha.1 --bin rustsy-process --locked
mkdir process-demo
cd process-demo
rustsy-process init /absolute/path/to/python3
rustsy-process doctor
rustsy-process graph
rustsy-process run
rustsy-process run --json > report.json
rustsy-process explain report.json
```
On Windows, supply the real `python.exe` path. `python -c "import sys; print(sys.executable)"` prints it on either platform. `init` creates a small file-processing example. `run` creates `rustsy_output.txt` and writes child stdout and stderr under `.rustsy-process`. `run --trace` emits a trace file when redirected. A failed task or failed verification returns a nonzero exit code. A default run prints the location of its logs. Reports can contain local paths and errors, so review them before sharing.
## Configuration
`rustsy.json` uses schema `version: 1`. It accepts a `tools` map and a `tasks` array. Each tool has a `path`, `version` and optional `files` list. Each task requires `name` and `tool`. Use `args` for literal arguments, `depends_on` for task names, `cwd` for a project-relative directory, and `inputs` and `outputs` for workspace-relative `{ "path": "…", "kind": "file" }` or `directory` declarations. Use forward slashes for artifact paths. Executable paths and tool-resource paths can be absolute or relative to `rustsy.json`. Use an explicit executable such as `node.exe` or `node` and supply the script as an argument.
The child receives only `env` and the existing environment variables named in `inherit_env`. A task may specify `timeout_ms`, `estimate_ms`, `ram_mib`, `gpu`, `vram_mib`, and `hard_ram_mib` for Windows Job Object limits. At the manifest level, `workers`, `ram_mib`, `gpu_workers`, `vram_mib` and `fingerprint_workers` set resource limits. Defaults are up to 12 CPU workers, 2 GiB of RAM admission, zero GPU admissions, and up to 12 hashing workers. `cache_dir` can override the project-local `.rustsy-process/cache` with an existing, separate directory.
## Cache integrity
Caching is disabled by default. Enable `cache: "local"` only after declaring `deterministic: true` and supplying the tool's `files` list, which may be empty for a standalone tool. Declare all files, resources, transitive tools and environment values that can affect the output. RustSy hashes the executable, listed tool files, declared input paths and contents, environment, arguments and dependency artifacts. On a miss it rechecks these identities before publication. It validates a cache hit by SHA-256 before using or restoring outputs. Timestamp and size alone cannot grant a hit. On handled failures, cached tasks restore the declared outputs they quarantined before execution.
Run trusted commands against trusted local cache and workspace paths. RustSy does not sandbox commands or detect undeclared dependencies. Keep inputs stable from the first read through tool execution and publication. A tool that reads the network, clock, dynamic resources missing from the declaration, or persistent external state should run with caching disabled. A declared output tree is exclusively owned by its producing task. RustSy can replace that entire tree when restoring a result.
Press Ctrl+C to request cancellation. A filesystem operation already in progress may finish first. On a subsequent `run` after interruption, RustSy acquires the workspace lock and rolls back interrupted output transactions before scheduling tasks. It preserves committed outputs, backups, and displaced incomplete files in its private directory. If interruption occurred around a child launch or while a child ran, RustSy reports the exact `child-active` marker and stops. Confirm the command and descendants have exited before moving that marker aside. The next `run` can then restore the previous outputs. A marker written by the earlier runner needs manual inspection. This protocol targets process termination on local filesystems. Cache eviction and power-loss recovery are outside this alpha.
The opt-in `--auto=REPORT.json` decision policy uses prior timings to choose between strict caching and running the commands directly. See the [developer guide](https://github.com/devnezu/RustSy/blob/v0.2.0-alpha.1/docs/PROCESS-GRAPH.md) for integration, benchmarks, troubleshooting and platform limits.
Gustavo Rodrigues founded RustSy and is its independent developer and initial maintainer. He directs this solo project, with AI assistance in research, implementation, optimization, testing and documentation. See `LICENSE-MIT`, `LICENSE-APACHE`, `COPYRIGHT` and `THIRD-PARTY-NOTICES.md`.