Skip to main content

Toolchain

The toolchain is an internal layer for downloading, installing, and managing tools (languages, dependency managers, libraries, and binaries) that are required at runtime. We embrace this approach over relying on these tools "existing" in the current environment, as it ensures the following across any environment or machine:

  • The version and enabled features of a tool are identical.
  • Tools are isolated and unaffected by external sources.
  • Builds are consistent, reproducible, and hopefully deterministic.

Furthermore, this avoids a developer, pipeline, machine, etc, having to pre-install all the necessary tools, and to keep them in sync as time passes.

How it works

The toolchain is built around proto, our stand-alone toolchain manager. moon will piggyback of proto's toolchain found at ~/.proto and reuse any tools available, or download and install them if they're missing.

Configuration

The tools that are managed by the toolchain are configured through the .moon/toolchain.yml file, but can be overridden in each project with moon.yml.

Supported tools

The following tools are currently managed by the toolchain.

Deno

  • Configured with: deno
  • Installed to: ~/.proto/tools/deno/x.x.x

Node.js

  • Configured with: node
  • Installed to: ~/.proto/tools/node/x.x.x
  • Dependency managers: npm, pnpm, yarn