Requirements
Runtime prerequisites and per-language setup guides for poly-bench
poly-bench generates and runs native code in each target language. Each runtime has specific prerequisites, toolchain requirements, and gotchas. This section provides a complete reference for setting up and using each language with poly-bench.
Before you run benchmarks, you need the language toolchain installed on your system. The table below lists the minimum version and binary for each supported runtime. For deeper technical details on how the runtime project works — including templates, generated files, and the codegen flow — see Polybench Runtime. Contributors who want to add a new language should start with Developers, which covers early development notices and the runtime addition guide.
The following runtimes are supported. Each has a dedicated guide that walks through init, adding dependencies, build, and execution.
| Language | Min Version | Binary | Full Guide |
|---|---|---|---|
| Go | 1.21+ | go | Go runtime |
| TypeScript | Node.js 18+ | node | TypeScript runtime |
| Rust | 1.70+ | cargo | Rust runtime |
| Python | 3.8+ | python3 / python | Python runtime |
| C | — | clang | C runtime |
| C# | .NET 8.0+ | dotnet | C# runtime |
| Zig | 0.15+ | zig | Zig runtime |
poly-bench init. You must install clang manually. All other runtimes can be installed interactively when missing.When you initialize a project with a language, poly-bench creates a scaffold in .polybench/runtime-env/<lang>/. You add dependencies with poly-bench add, and poly-bench install (or poly-bench build) runs the appropriate package manager. The table below summarizes what each runtime uses.
| Runtime | Init creates | Add deps | Install runs |
|---|---|---|---|
| Go | go.mod | poly-bench add --go pkg@ver | go get |
| TypeScript | package.json, tsconfig.json | poly-bench add --ts pkg@ver | npm install |
| Rust | Cargo.toml, src/main.rs | poly-bench add --rs crate@ver | cargo add |
| Python | requirements.txt | poly-bench add --py pkg==ver | pip install -r |
| C | main.c (or vcpkg+CMake with deps) | poly-bench add --c pkg@ver | cmake + vcpkg |
| C# | polybench.csproj, Program.cs | poly-bench add --cs pkg@ver | dotnet restore |
| Zig | build.zig, build.zig.zon | poly-bench add --zig url | zig fetch |
Each language page walks through creating a poly-bench project from start to finish. The guides include init commands, dependency management, build behavior, and language-specific gotchas or troubleshooting tips.