fv-compute-container
The process backend for FusionVault Kinetics. A transform is any program that reads its input on stdin and writes its output on stdout. Use it where the WASM sandbox is the wrong fit: GPU work, heavy native dependencies, or an interpreter and package set you already have.
Run a process transform
use Runtime;
use ContainerBackend;
#
let runtime = builder
.root // <dir>/transform.toml with impl = "container"
.backend
.build?;
let out = runtime.run?; // spawns `entry`, streams the batch through
# Ok::
cargo run -p fv-compute-container --example quickstart runs this against a twenty-line Python
transform in the repository.
Write a process transform
The manifest's entry is the command line, run with the transform's directory as the working
directory. Two wire formats, chosen by protocol:
-
json: one JSON document in, one out. No dependencies beyond a JSON parser.stdin: {"ref": "riskBand", "config": {}, "mode": "batch", "inputs": [{"dataset": "in", "columns": ["id", "score"], "rows": [{"id": 1, "score": 0.2}]}]} stdout: {"rows": [{"id": 1, "score": 0.2, "band": "low"}]} or {"error": "why"} -
arrow-ipc(the default): an Arrow IPC stream in and out, with the batch's real schema. Faster, and the natural choice when the process links Arrow. The reference guest issrc/bin/refguest.rs.
Output rows must carry exactly the declared output columns; the backend checks the result against the manifest. A non-zero exit fails the batch, with the last line of stderr as the reason. One input per transform today.
Apache-2.0.