April 15, 2026 Read on mitchellh.com
3.4

Simdutf Can Now Be Used Without libc++ or libc++abi

GhosttySystems ProgrammingDeveloper Tools

Mitchell Hashimoto details his work modifying simdutf, a high-performance Unicode library, to be buildable without libc++ or libc++abi dependencies. This was the final C++ standard library dependency blocking libghostty-vt from being fully portable across embedded, WebAssembly, and freestanding environments. He walks through the technical approach: creating a stl_compat.h shim for standard library types, replacing function-local statics with translation-unit statics to avoid __cxa_guard_acquire, and providing weak symbol shims for __cxa_pure_virtual. He emphasizes preserving ABI compatibility except when the new flag is enabled, and added CI audits to prevent regression. The bulk of the post reflects on the contributor etiquette of submitting a 3,000-line PR, where he spent more time on validation and PR preparation than on the code itself.

Removing hidden C++ ABI dependencies requires both deep toolchain knowledge and, equally important, the human discipline to present large contributions in a way that respects maintainers' time.
  • 4

    Getting something working and getting something merged are two different things.

  • 2

    The sneakier part is libc++abi, which provides the C++ ABI, including things like exception handling, virtual function tables, RTTI, etc.

  • 2

    They show up because the compiler quietly emits calls into the C++ ABI runtime for ordinary-looking language features.

  • 3

    Ironically, the full diff took me about 2 hours to put together, but the extra validation work and PR preparation took me about 3 hours.

  • 4

    I spent more time on the human boundary than the code itself, as we should out of respect for the effort maintainers put into their projects.

  • 5

    And I know the burden of recent AI slop.

  • 4

    Since by definition someone using SIMDUTF_NO_LIBCXX is not interested in libc++, these ABI breakages felt like a feature rather than a bug.

  • 3

    So I put in the effort I would want from an all-star contributor and tried to be that person for the simdutf maintainers.

technical