Meta’s open-source developer toolchain
Meta’s engineers work in repositories containing millions of files. The tools they use daily must handle that scale while staying responsive. Several of these tools are open source, so the same infrastructure used internally is available for evaluation and adoption.
Sapling: source control for huge repositories
Sapling is Meta’s version control system, built to handle massive codebases without sacrificing usability. It has three core parts: a server, a client, and a virtual file system.
The server stores repository data using custom storage formats, wire protocols, and algorithms, and is largely written in Rust. The client provides the standard operations developers expect—checkout, rebase, commit, amend—and can also communicate with Git servers, making it possible to work on GitHub repositories with the open-source release of Sapling.
The virtual file system solves a practical problem: checking out a repository of Meta’s size requires writing an enormous number of files to disk, which alone can take considerable time. Sparse checkouts help by letting developers declare which subset of files they need, but EdenFS takes a different approach. It completes checkouts in seconds by fetching files from the server only when they are actually accessed, rather than materializing everything upfront.
Buck2: parallel builds across languages
Buck2 is the build system used for compiling and testing code changes. It is engineered for large-scale use, with support for remote caching and remote execution so teams can share compilation results and individual developers can distribute builds across thousands of machines. Multi-language builds are a first-class concern—a Python program depending on a Rust library that links against C++ code generated by Erlang is handled without issue.
Buck2 also works with Sapling and EdenFS. It uses Watchman to track file changes, and Watchman supports EdenFS so that files not yet on disk are handled correctly. Buck2 can invoke EdenFS operations directly to read files without going through the disk, an important optimization when virtual file systems add overhead.
Static analysis and testing at scale
Testing and analysis tools at Meta must produce fast, reliable signals across enormous codebases. Infer is the general-purpose static analysis platform used for interprocedural analysis and supports multiple languages, including Java and C++. For more targeted checks, RacerD detects Java concurrency bugs and was instrumental in the effort to make Facebook’s Android News Feed multi-threaded.
Testing frameworks are often language-specific. Jest, the JavaScript testing framework, was transferred to the OpenJS Foundation in 2022 to support its continued development outside Meta. There are also tools aimed between manual tests and static analysis: Sapienz, for instance, runs automated tests on mobile apps by simulating user interaction to uncover crashes and other defects.
Beyond the open-source stack
The complete developer workflow includes proprietary components as well. Phabricator, known internally as Phab, serves as the code review and CI tool, enabling engineers to manage stacks of diffs. Further detail on both the proprietary and open-source portions of the workflow is covered in Meta’s documentation on the developer experience.



