Pants is a fast, scalable, user-friendly build and developer workflow system for codebases of all sizes, including yours!
Pants installs, orchestrates and runs dozens of standard underlying tools - compilers, code generators, dependency resolvers, test runners, linters, formatters, packagers, REPLs and more - composing them into a single stable, hermetic toolchain, and speeding up your workflows via caching and concurrency.
Pants is designed to be easy to adopt, use, and extend. It doesn't require you to refactor your codebase or to create and maintain massive amounts of build metadata. You invoke it directly on source files and directories, so it doesn't require users to adopt a new conceptual model.
Pants is currently focused on Python, Go, Java, Scala, Shell, and Docker, with more languages and frameworks coming soon. The Pants community is friendly and helpful, and supported by Toolchain, a venture-backed company whose mission is to enable fast, stable, ergonomic developer workflows for everyone.
Pants is useful for repos of all sizes, but is particularly valuable for those containing multiple distinct but interdependent pieces.
Pants works well with (but does not require) a monorepo architecture: a codebase containing multiple projects—often using multiple programming languages and frameworks—in a single unified repository. If you want to scale your codebase without breaking it up into multiple disconnected repos, with all the versioning and maintenance headaches that causes, Pants provides the tooling for you to do so effectively.
Pants is designed for fast, consistent, ergonomic builds. Some noteworthy features include:
- Dependency modeling using static analysis instead of handwritten metadata
- Fine-grained invalidation
- Shared result caching
- Concurrent and remote execution
- Support for dependency lockfiles to prevent supply chain attacks
- A unified interface across all tools and languages
- Extensibility and customizability via a plugin API
- Code introspection features
- Pants ships with support for Python, Go, Java, Scala and Shell.
- Pants supports a wide range of code generators (such as Thrift, Protobuf, Scrooge and Avro), linters and formatters, and it is easy to add support for new or custom ones
- Pants can create standalone binaries, Docker images, AWS Lambdas and GCP Cloud Functions
We're listening to the community for which languages, frameworks and tools we should support next, so let us know about your needs by opening an issue on GitHub or chatting with us about it on the community Slack!
Pants was designed for extensibility, and we welcome contributions!
The core of Pants is its execution engine, which sequences and coordinates all the underlying work. The engine is written in Rust, for performance. The underlying work is performed by executing rules, which are typed Python 3 async coroutines for familiarity and simplicity.
The engine is designed so that fine-grained invalidation, concurrency, hermeticity, caching, and remote execution happen naturally, without rule authors needing to think about it.
See here for more details about the Pants engine.
Pants (v2) is a leap forward in the evolution of build systems, a category that runs from the venerable Make through Ant, Maven, Gradle and SBT, to Bazel, Please, Buck, Pants v1 and others.
Its design leans on ideas and inspiration from these earlier tools, while optimizing not just for speed and correctness, but also for ease of adoption, ease of use and ease of extension, all for real-world use cases at a variety of teams.
Pants is making engineering teams productive and happy at a range of companies and organizations. See a sample of them here!
Toolchain is the lead sponsor of the Pants project.
Pants v2 vs. v1
This documentation is for Pants v2, which is a new system built from the ground up, based on lessons from past work on Pants v1, as well valued feedback from the user community. See https://v1.pantsbuild.org for Pants v1 documentation.
Updated 2 months ago