Skip to main content

What is proto?

3 min

proto is a pluggable version manager, a unified toolchain.

If you're unfamiliar with the concept of a toolchain, a toolchain is a collection of tools that are downloaded, installed, and managed by version through a single interface. In the context of proto's toolchain, a tool is either a programming language, a dependency/package manager for a language, or a custom implementation provided by a plugin. It's the next step in the version manager evolution.

Why proto?

proto was designed to be a modern and holistic version manager for all of your favorite programming languages. We believe a single tool that works the same across every language is better than multiple ad-hoc tools. While we only support a handful of languages today, we aim to support many more in the future!

success

proto powers moon's toolchain, enabling a single source of truth for both tools!

Features

  • Lightspeed! With Rust and WASM, we can guarantee exceptional performance.
  • Multi-language. A single CLI for managing versions for all of your languages.
  • Cross-platform, for a consistent experience across machines and teams.
  • Contextual version detection, ensuring the correct version of a tool is always used.
  • Checksum verification, ensuring a tool came from a trusted source.
  • Detects and infers from a language's ecosystem for maximum compatibility.
  • Pluggable architecture, allowing for custom tooling.

How does it work?

The toolchain is a .proto directory within the current user's home directory, e.g., ~/.proto.

The first step in a tool's life-cycle is being downloaded to ~/.proto/temp. Downloads are typically an archive that can be unpacked into a target directory. Once downloaded, we verify the downloaded file by running a checksum. If this check fails for any reason, the tool is unusable, and the process is aborted.

After a successful verification, the last step in the tool's life-cycle can begin, installation. Depending on the type of download, the installation process may differ. For archives, we unpack the tool to ~/.proto/tools/<name>/<version>. In the future, we'll support building from source.

From here, we make these tools globally available by prepending ~/.proto/shims and ~/.proto/bin to PATH (typically as part of your shell profile). Continue reading for more about these folders.

Shims

proto is powered the by industry standard concept of shims. For each tool installed in proto, a shim file will exist at ~/.proto/shims/<tool>. Shims are not symlinks to the tool's binary, but are thin wrappers around proto run, enabling automatic version detection on every invocation!

info

If you'd prefer to not use shims, remove the ~/.proto/shims directory from PATH in your shell profile.

Binaries

Alternatively, we also support a non-shim based approach, which creates symlinks to a tool's primary executable. For each tool installed in proto, a symlink will exist at ~/.proto/bin/<tool>.

The version of a tool that's symlinked is not dynamic, and is manually created by pinning the chosen version with proto install --pin. This also happens automatically the first time a tool is installed.

info

Not all tools support symlinking a binary, as not all files are executable. For example, most Node.js package managers currently do not support this, as JavaScript files are not executable (especially on Windows). Shims are required for these tools.

Supported tools

The following tools are officially supported in proto via moonrepo. Additional tools can be supported through third-party plugins.

Supported targets

Because proto is written in Rust, we only support targets that are explicitly compiled for, which are currently:

Operating systemArchitectureTarget
macOS 64-bitIntelx86_64-apple-darwin
macOS 64-bitARMaarch64-apple-darwin
Linux 64-bitIntel GNUx86_64-unknown-linux-gnu
Linux 64-bitIntel muslx86_64-unknown-linux-musl
Linux 64-bitARM GNUaarch64-unknown-linux-gnu
Linux 64-bitARM muslaarch64-unknown-linux-musl
Windows 64-bitIntelx86_64-pc-windows-msvc

Roadmap

  • Build from source for existing languages.
  • New languages.