Harmont docs
Examples

Rust

A Cargo project: build, test, clippy, and fmt fork from one toolchain install.

A Cargo project: build, test, clippy, and fmt fork from one toolchain install.

Project layout

Cargo.toml
README.md

Pipeline

.hm/pipeline.py
"""Rust example pipeline."""from __future__ import annotationsimport harmont as hmfrom harmont._rust import RustToolchain@hm.target()def project() -> RustToolchain:    return hm.rust.toolchain(path=".")@hm.pipeline(    "ci",    env={"CI": "true"},    default_image="ubuntu:24.04",    triggers=[hm.push(branch="main")],)def ci(project: hm.Target[RustToolchain]) -> tuple[hm.Step, ...]:    return (project.build(), project.test(), project.clippy(), project.fmt())
.hm/pipeline.ts
import { pipeline, push, type PipelineDefinition } from "@harmont/hm";import { rust } from "@harmont/hm/toolchains";const project = rust.toolchain({ path: "." });const pipelines: PipelineDefinition[] = [  {    slug: "ci",    triggers: [push({ branch: "main" })],    pipeline: pipeline(      [project.build(), project.test(), project.clippy(), project.fmt()],      { env: { CI: "true" }, defaultImage: "ubuntu:24.04" },    ),  },];export default pipelines;

Run it

hm run ci

On this page