Header-only C++ library for fast, exact parsing of float, double and integer values from strings, a drop-in style from_chars implementation.
meta/folly
Facebook's open-source C++20 library of core components, complementing Boost and std, used extensively inside Meta.
- Stars
- 30,554
- Forks
- 5,879
- Open issues
- 487
- Last commit
- 24 hours ago
What is it?
Folly (Facebook Open-source Library) is a collection of C++20 components built for practical use and efficiency. It fills gaps where the standard library or Boost lacks something needed, or where those implementations do not meet a required performance profile. Components are relatively independent and range from a few symbols to larger modules, and the library is often a shared dependency of Meta's other open-source C++ projects.
Folly targets gcc, clang, or MSVC with C++20 support. The CMake build fetches any dependencies not found on the system, and getdeps.py can also build the library along with its sibling projects. It runs on Linux (x86-32, x86-64, ARM), iOS, macOS, and Windows (x86-64), though CMake is only tested on some of these platforms. The project makes no ABI compatibility guarantees between commits, so building it as a static library into a temporary prefix is recommended.
New or unstable code lives in the experimental directory and is not meant for client use. Documentation is in the docs folder, and unit tests are provided for each component.
Key features
- 01Provides C++20 components for tasks where the standard library or Boost falls short.
- 02Builds with CMake, which fetches missing dependencies automatically.
- 03Supports gcc, clang, and MSVC on Linux, macOS, Windows, and iOS.
- 04Includes a getdeps.py script that builds folly and its sibling projects together.
- 05Offers unit tests for each component and optional googletest integration.
Use cases
- Adding high-performance utility components to a large C++ codebase.
- Building C++ projects that depend on Meta's other open-source C++ libraries.
- Replacing hand-rolled containers, string utilities, or synchronization primitives with tested alternatives.
Quick start
- 1
Clone the repository
git clone https://github.com/facebook/folly - 2
Enter the project directory
cd folly - 3
Configure the CMake build (fetches missing dependencies)
cmake -B _build - 4
Build the library
cmake --build _build
Things to know
- No ABI compatibility guarantees between commits, so building as a static library and pinning a version is recommended.
- The CMake build is only tested on some platforms, with macOS and Linux as the minimum targets.
- Many tests are disabled for Windows builds.
In collections
Topics
FAQ
- What is folly?
- Facebook's open-source C++20 library of core components, complementing Boost and std, used extensively inside Meta. Folly (Facebook Open-source Library) is a collection of C++20 components built for practical use and efficiency. It fills gaps where the standard library or Boost lacks something needed, or where those implementations do not meet a required performance profile. Components are relatively independent and range from a few symbols to larger modules, and the library is often a shared dependency of Meta's other open-source C++ projects.
- Is folly free to use? What license does it have?
- folly is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
- Is folly still maintained?
- Actively maintained. The last commit to folly was on Nov 6, 2026.
- What can I use folly for?
- Adding high-performance utility components to a large C++ codebase. Building C++ projects that depend on Meta's other open-source C++ libraries. Replacing hand-rolled containers, string utilities, or synchronization primitives with tested alternatives.
- How do I install folly?
- Clone the repository: git clone https://github.com/facebook/folly Enter the project directory: cd folly Configure the CMake build (fetches missing dependencies): cmake -B _build Build the library: cmake --build _build
- Where can I get folly?
- The source code and installation instructions are on GitHub: https://github.com/meta/folly
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A C++ library for writing microbenchmarks that time small code snippets, similar in structure to unit tests.
Fast, concurrent, evicting in-memory cache for Go that stores large numbers of entries on the heap while keeping GC overhead low.
A fast, concurrent, memory-bound cache library for Go with cost-based eviction and TinyLFU admission.
A Node.js worker thread pool for running CPU-heavy tasks off the main event loop, with queues, cancellation and run-time stats.
Java library of high-performance data structures and utilities such as primitive collections, off-heap buffers, queues and timer wheels.