$ docker build -t harvest/harvest .This image runs HARVEST's agentic translation pipeline, driving Claude
(via the Anthropic API) to translate the C source project to Rust and
then verify and repair the result. HARVEST is pinned to a specific
commit and built from source against a pinned nixpkgs (see
default.nix), and the claude CLI and a Rust toolchain are provided
on the agent's PATH so it can build and test the translated crate.
Claude runs headless against the Anthropic API; there is no interactive login. Provide the API key as an environment variable:
ANTHROPIC_API_KEY-- required. The entry point exits immediately if it is unset.
The TRACTOR runner takes a Docker image name, source and destination directories on the host and uses these to invoke the translation pipeline in this container.
The container must expect the following environment:
-
A source directory bind-mounted in the container read-only.
-
An output directory bind-mounted in the container read-only.
-
$newuid and $newgid environment variables denoting the owner user and group that the output should belong to.
-
ANTHROPIC_API_KEYset to a key with enough rate/usage headroom for a multi-hour run (a ~100 kloc translation can take many hours). -
A current-working-directory
/usr/c2rust_execution
The container's entrypoint executable is passed two command-line arguments:
-
The source directory (e.g.
/tmp/src) -
The output directory (e.g.
/tmp/out)