# Build systems

> A build system is the package that knows how to build a language; a project names it with build = and pins it like a library.

**A build system is the package that knows how to build one language. A project names it with `build =`, and pins it like any library.**

One per language: `JavaBuild`, `KotlinBuild`, `GoBuild`, `RustBuild`, `PythonBuild`, `NodeBuild`, `NodeWeb`, `ElixirBuild`, `CustomBuild`
Declared: in `build-dependencies`, as `JavaBuild = 1.0`
Set up: in `configuration/<BuildSystem>.config`

## How a build runs {#how}

1. plinto reads the workspace's revision, and takes the packages `build-dependencies` name: the build system and its toolchain.
2. It loads the build system, and hands it the project, with its `dependencies` and `test-dependencies` taken from the group the same way.
3. The build system compiles, tests and packages, in phases: `prepare`, `compile`, `test`, `package`, and `release` when it is a release.

A new version of a build system is just a new release in your group, so moving every project to it is a revision like any other.

## One build for libraries and programs {#libraries-and-programs}

The same build system builds a library and a program. A program only names its entry point, with `main` in `plinto.conf`: a class in Java, a file in Rust. Then `plinto run` starts it, and the `Archive` packager packs it to run on a server: a `.tar.gz` with the program, its libraries and its runtime, such as its own JDK. See [Deployments](deployments.md).

## Your own steps {#hooks}

Any build system runs your scripts before or after a phase: see [Run a script during the build](../guides/build-scripts.md). For a language plinto has no build system for, [CustomBuild](../languages/custom.md) runs your own `scripts/build.sh`.

- [Languages](../languages/java.md): each build system, its layout and its settings
- [Configuration files](../reference/configuration.md): build settings
- [Packages](packages.md): what a build takes
