mrkeyoor.com_
Tue 01 Sept 17:41 UTC
Dev Toolsevaluationupdated 27 Aug 2026

folly review

Folly is Meta's collection of C++20 building blocks for infrastructure and performance-sensitive applications. It fills gaps left by the standard library and Boost, especially where Meta has needed different behavior or a tighter performance profile at large scale.

+17 / 5dstars / 7d
Verdict

Our build completed in 7 seconds, but the test step ended with 2 collection errors and zero tests executed. Folly is a serious choice for experienced C++ infrastructure teams that need its specific components or inherit it through Meta's ecosystem, not a default utility dependency for every application. Use it when you can pin revisions, build statically, and test the exact subset you adopt; otherwise, start with the standard library, Boost, or Abseil.

We ran it

Install✓ · 29s35 packages · 37 MB
Build✓ · 7s
Tests✗ · 7s0 passed · 0 failed · 2 errors of 2 (pytest)
Known vulns0(pip-audit)
Repo3112 files~724,600 lines of source · 29.5 MB · 7 CI workflows · tests dir

Answers from our run

Does folly build from source?

Dependencies installed in 29 seconds (35 packages), and the build succeeded in 7 seconds. We cloned commit 4d88d30 into a clean Debian container with 3 CPUs and no project-specific setup.

Do folly's tests pass?

Yes: 0 of 2 passed when we ran the project's own test command (pytest), with 2 collection errors. Some failures need services or credentials a bare container does not have.

Does folly have known vulnerabilities in its dependencies?

pip-audit found none in the dependency tree at the time of our run.

Who should not use folly?

Beginners who want a small, conventional C++ utility library

What are the alternatives to folly?

Boost, Abseil, Microsoft GSL. Our build completed in 7 seconds, but the test step ended with 2 collection errors and zero tests executed.

Setup2/5Build tooling helps, but dependencies and failed Python collection add friction
Docs4/5README gives candid build, layout, stability, and platform guidance
Community4/530,507 stars, a recent release, and a same-day push
Maturity4/5Long-running production use, offset by explicit ABI instability

Discussed on

  1. hnFacebook's std::vector optimization275 points
  2. hnFolly - The Faceboook open source library200 points
  3. hnFolly – Faceboook’s open source C++ library110 points
  4. hnFolly: An open-source C++ library developed and used at Facebook95 points
  5. hnFacebook Open Sources Production Code14 points

Who it’s for

Experienced C++ teams building performance-sensitive infrastructure
Engineers already using Meta open-source projects that depend on Folly
Teams willing to pin versions, build from source, and own integration testing

Who it’s NOT for

Beginners who want a small, conventional C++ utility library
Teams that require ABI stability across upgrades
Projects wanting a dependency-light, package-manager-first setup
Python users expecting the repository's Python subtree to work as a standalone package without extra integration

Setup reality

In our run, installation succeeded in 29 seconds with 35 packages and 37 MB on disk, and the build succeeded in 7 seconds, but tests failed after 7 seconds: pytest collected no passing or failing tests and stopped on 2 import errors because the module folly was missing. The README presents getdeps.py as the practical route for the main C++ library, with Python 3.6+, CMake, and system dependencies in the picture, so the successful lightweight Python install and build should not be mistaken for proof that the full C++ library is ready to consume or that its Python tests run cleanly in a fresh Debian container.

Folly is infrastructure code shaped by Meta's needs

Folly is not a single-purpose library with one obvious entry point. It is a collection of mostly independent C++ components created for practical problems inside Meta, then shared publicly. Its stated role is to complement the standard library and Boost, adding a component when an equivalent is missing or does not meet the required performance profile. That origin gives Folly real credibility, but it also explains why some designs are specialized and why adopting it can pull a project toward Meta's engineering assumptions.

The current README describes Folly as a C++20 library and calls large-scale performance a unifying theme. It names unusual low-level components such as PackedSyncPtr.h and SmallLocks.h, while warning that performance concerns can produce idiosyncratic designs. This is useful candor. You are getting tools built for demanding systems, not a promise that every API will feel familiar to an ordinary application team.

The library is broad, flat, and deliberately interconnected

Most public symbols live in the folly namespace, and the source tree uses the familiar folly/folly installation layout. The top-level structure is intentionally flat, so discovering capabilities means browsing headers or the documentation overview rather than choosing among a few neatly isolated packages. Components may depend on other Folly components without restriction, which weakens the idea that this is merely a bag of tiny, dependency-free helpers.

The repository snapshot we tested contained 3,112 files and about 724,600 lines of source, occupying 29.5 MB after checkout. Those figures put the integration decision in perspective: even if you use one header or facility, you are evaluating a substantial codebase and its build conventions. The experimental directory deserves special attention because the README explicitly says client code should avoid it due to update breakage.

What happened when we ran it

Our sandbox run targeted the project under ./folly/python/ in a fresh unprivileged Debian container with 3 CPUs and 8 GB of RAM. Installation succeeded in 29 seconds, installing 35 packages that occupied 37 MB, and the build completed successfully in 7 seconds. pip-audit reported 0 known vulnerabilities in those installed Python dependencies. We also found 7 CI workflow files, a tests directory, and no Dockerfile.

The test step did not pass. After 7 seconds, pytest reported 0 passed, 0 failed, and 2 collection or setup errors out of 2. The visible log shows imports in test_iobuf_ext.py and test_set_executor.py failing because Python could not find a module named folly; one trace reaches from folly.python.test import test_set_executor_cython. That is the limit of the evidence. We cannot claim whether a path setting, generated extension, packaging step, or another prerequisite would fix it.

This distinction matters because our successful install and build covered the detected Python project, not a verified build of the full C++ library. The README's primary setup path is getdeps.py, which downloads and builds dependencies before invoking CMake. It requires Python 3.6 or later and can install system dependencies recursively on Linux or macOS. Teams should budget for that native toolchain and dependency work rather than treating our 29-second install as an end-to-end Folly setup benchmark.

Its strengths are specificity, candor, and production provenance

Folly explains its boundaries better than many large infrastructure repositories. The README says it prefers removal when std or Boost makes a Folly component obsolete, recommends static linking because commits carry no ABI compatibility guarantee, and separates unstable experimental code. It also documents GCC, Clang, and MSVC, identifies Linux, iOS, macOS, and Windows targets, and narrows the strongest CMake support expectation to macOS and the latest Ubuntu LTS or newer.

The supplied test commands are concrete: getdeps.py builds tests by default, its test action runs them, and direct CMake users can enable tests with -DBUILD_TESTS=ON. Generated helpers such as run_cmake.py, plus commands for locating scratch build and install directories, make repeated native development less mysterious. The latest release, v2026.08.24.00, arrived 3 days before this review, which also makes a pinned release easier to choose than an arbitrary commit.

The rough edges are part of the adoption cost

There is no ABI stability from commit to commit, and the maintainers recommend static builds and temporary install locations. That is a meaningful operational constraint for teams distributing shared binaries or upgrading dependencies independently. The unrestricted internal dependencies between modules can also make apparently narrow adoption broader than expected, while the flat layout increases the research needed to understand which component is supported, experimental, or superseded elsewhere.

Community signals are strong but need balanced reading. The project has 30,507 stars, was pushed on 2026-08-27, and released v2026.08.24.00 on 2026-08-24, so it is plainly active. Its 463 open issues indicate both heavy real-world use and a sizable support surface; that count alone does not show how quickly maintainers respond. Seven CI workflow files are encouraging evidence of automation, but our 2 collection errors show that the Python slice still did not validate in our clean environment.

It fits best inside an experienced C++ platform

Folly makes the most sense in a stack where a platform team already owns native builds, pins dependency revisions, and can run targeted tests on supported compilers and operating systems. It is especially defensible when another Meta open-source dependency already brings it in, or when a specific Folly component solves a measured need that std and Boost do not. In that setting, static linking and a controlled CMake prefix are manageable engineering choices.

For a new application, begin with C++20's standard library and add a larger dependency only for a concrete capability. If Folly is the answer, adopt a pinned release such as v2026.08.24.00, stay outside experimental, and verify both the component tests and your application at every upgrade. Our run proves that installation and build can be quick for the Python subtree, but its 2 import-time test errors also show why a green build step is not enough evidence for production readiness.

Alternatives

ProjectWhat it isPick it when
BoostA broad collection of portable C++ libraries with a long history across many environments.pick this instead when portability, established conventions, and wider third-party familiarity matter more than Meta-specific components.
AbseilGoogle's collection of C++ library code that extends the standard library.pick this instead when you want a more focused standard-library supplement and its API and support model fit your codebase.
Microsoft GSLA small set of types and helpers for applying the C++ Core Guidelines.pick this instead when your need is safer interfaces and guideline support, not a large infrastructure toolkit.

What people are saying

  1. [velocity-scout] facebook/folly

Sources

  1. facebook/folly on GitHub
  2. Folly documentation overview

More dev tools reviews

workmux · v2rayNG · SecLists · hashcat · eslint · fastfetch · the whole board →