Getting started

Initialize a workspace from the repository root:

imp init

The interactive checklist detects C/C++, JavaScript/TypeScript, Odin, Python, and Rust sources. Select the languages and capabilities the workspace needs; imp then creates imp.workspace.js with the matching rule and workflow imports. Those rules provide pinned default toolchains; initialization never overwrites an existing workspace or creates a nested workspace.

Every imp workspace has a root marker file, imp.workspace.js. To create one manually, import the rule modules your BUILD.js files will use (see The workspace file for what else it's for):

import "//rules/c/cmake";
import "//rules/workflows/build";

Targets are declared in BUILD.js files anywhere in the workspace tree — imp discovers them automatically:

import { stampFile } from "//rules/gen";

export const hello = stampFile({
    output: "generated/hello.txt",
    text: "hello from imp",
});

Build it with:

imp build //:hello