facebook/folly

An open-source C++ library developed and used at Facebook.

View on GitHub ↗Jump to charts ↓

Summary Information

Updated 18 minutes ago
Added to GitGenius on August 8th, 2026
Created on June 1st, 2012
Open Issues & Pull Requests: 457 (+0)
Number of forks: 5,865
Total Stargazers: 30,488 (+0)
Total Subscribers: 994 (+0)

Issue Activity (beta)

Open issues: 113
New in 7 days: 1
Closed in 7 days: 0
Avg open age: 625 days
Stale 30+ days: 110
Stale 90+ days: 103

Recent activity

Opened in 7 days: 1
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

No label distribution available yet.

Most active issues this week

Repository Insights (GitGenius)

Median issue/PR response: 4.9 days
Mean response time: 409.5 days
90th percentile: 1841.7 days
Tracked items: 204

Most active contributors

Detailed Description

Folly is an open-source C++ library developed and maintained by Facebook that provides a collection of core library components used extensively throughout Facebook's infrastructure. Written in C++20, Folly complements rather than competes with established offerings like Boost and the C++ standard library, with components added only when existing solutions are unavailable or fail to meet Facebook's performance requirements. The library removes components when they become obsolete due to additions to the standard library or Boost.

The library's design philosophy centers on performance at large scale. This focus on efficiency sometimes results in idiosyncratic designs, as exemplified by components like PackedSyncPtr.h and SmallLocks.h, where unconventional approaches are adopted to achieve superior performance characteristics. Performance concerns permeate the entire library, making it a unifying theme across all Folly components.

Folly employs a logical design based on relatively independent components with no restrictions on internal dependencies, meaning any Folly module can use other Folly components. All symbols are defined in the top-level namespace folly, with macro names following the ALL_UPPERCASE convention prefixed with FOLLY_. Internal namespaces such as folly::internal and folly::detail exist but are not intended for user code. The physical structure follows the classic stuttering scheme used by Boost, with a folly/folly directory structure where the first directory serves as an installation root and the second distinguishes the library during includes. The directory structure remains intentionally flat to mirror the namespace structure. An experimental subdirectory contains files used internally at Facebook but not considered stable for external use. Unit tests reside in folly/folly/test with naming conventions like ComponentXyzTest.cpp, while documentation is located in folly/folly/docs.

The library supports multiple compilers including gcc 5.1 and later, clang, and MSVC, running on Linux (x86-32, x86-64, and ARM), iOS, macOS, and Windows x86-64. Folly provides no ABI compatibility guarantees between commits, so the project recommends building it as a static library. The build system uses CMake and includes a getdeps.py script written in Python 3.6 or later that downloads and builds all necessary dependencies before invoking cmake. This script is used by many of Meta's open-source tools and works on Linux, macOS, and Windows. Key dependencies include Boost compiled with C++14 support and googletest for running tests. The build process outputs a static library at installed/folly/lib/libfolly.a, with options to specify custom installation directories and scratch paths. For macOS users, Folly is available through Homebrew via brew install folly, and for Windows users, it's available through Vcpkg. The project is tested in CI on Ubuntu LTS and occasionally on other distributions, with some tests disabled on Windows builds as documented in CMakeLists.txt.

folly
by
facebookfacebook/folly

Repository Details

Fetching additional details & charts...