explaingit

facebook/folly

Analysis updated 2026-06-20

30,362C++Audience · developerComplexity · 4/5Setup · hard

TLDR

Folly is Meta's open-source C++ library of high-performance data structures, algorithms, and utilities that fill gaps the C++ standard library doesn't cover when operating at large scale.

Mindmap

mindmap
  root((Folly))
    What It Is
      C++ library
      Meta open source
      Performance focused
    What It Provides
      Data structures
      Algorithms
      Utilities and abstractions
    Key Features
      C++20 standard
      High throughput design
      Modular components
    Use Cases
      High-load production systems
      Meta project dependencies
      Standard lib replacement
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Use high-performance data structures and utilities in a C++ codebase where the standard library is too slow under heavy load

USE CASE 2

Link Folly as a dependency when building a project that requires other Meta open-source C++ libraries

USE CASE 3

Replace a slow standard library container with a Folly equivalent optimized for high-throughput production systems

What is it built with?

C++

How does it compare?

facebook/follydragonflydb/dragonflyfreecad/freecad
Stars30,36230,44430,774
LanguageC++C++C++
Setup difficultyhardmoderateeasy
Complexity4/54/53/5
Audiencedeveloperops devopsgeneral

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · hard Time to first run · 1h+

Building from source requires CMake, a C++20-compatible compiler, and multiple system dependencies, the build process takes significant time.

In plain English

Folly is an open-source C++ library developed and used internally at Facebook (now Meta). It is not a single unified toolkit but rather a collection of independent, reusable C++ components, data structures, algorithms, utilities, and abstractions, that Facebook engineers found useful enough to share publicly. The name is loosely an acronym for "Facebook Open-source Library." The library fills gaps that the C++ standard library and other common libraries like Boost do not cover, or covers them with better performance characteristics suited to operating at large scale. Performance is a central theme throughout: the README notes that some designs are more unconventional than they would be otherwise precisely because they optimize for speed in high-traffic production systems. Folly is written using C++20 features, the current modern version of the C++ language standard. In practice, Folly often appears as a dependency of other Facebook open-source projects that are themselves written in C++, serving as a shared foundation. Individual components in Folly are relatively self-contained, so a project might depend on only a few of them rather than the entire library. A C++ developer would use Folly when they need a data structure or utility that performs better than the standard library alternative under heavy load, or when building software that depends on other Meta open-source projects that already require it. It is built as a static library and supports Linux, macOS, iOS, and Windows.

Copy-paste prompts

Prompt 1
Which Folly data structures should I use instead of std::unordered_map for better performance under heavy concurrent load?
Prompt 2
How do I add Folly as a dependency to a C++ project using CMake?
Prompt 3
What utilities does Folly provide for asynchronous programming in C++ and how do they compare to std::future?
Prompt 4
How do I build Folly from source on Ubuntu, what dependencies do I need to install first?
Prompt 5
What are the most commonly used Folly components and what standard library equivalent does each one replace?

Frequently asked questions

What is folly?

Folly is Meta's open-source C++ library of high-performance data structures, algorithms, and utilities that fill gaps the C++ standard library doesn't cover when operating at large scale.

What language is folly written in?

Mainly C++. The stack also includes C++.

How hard is folly to set up?

Setup difficulty is rated hard, with roughly 1h+ to a first successful run.

Who is folly for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Scan in gitsafehub Deploy in gitdeployhub facebook on gitmyhub

Verify against the repo before relying on details.