Skip to content

libghostty: Remove all libc++ and libc++ ABI dependencies#12291

Merged
mitchellh merged 1 commit intomainfrom
push-ltnvwwrsowru
Apr 15, 2026
Merged

libghostty: Remove all libc++ and libc++ ABI dependencies#12291
mitchellh merged 1 commit intomainfrom
push-ltnvwwrsowru

Conversation

@mitchellh
Copy link
Copy Markdown
Contributor

@mitchellh mitchellh commented Apr 15, 2026

This updates simdutf to my fork which has a SIMDUTF_NO_LIBCXX option that removes all libc++ and libc++ ABI dependencies. The plan is to open an upstream PR with this, but I want to verify it here first.

From there, the hand-written simd code we have has been updated to also no longer use any libc++ features. Part of this required removing utfcpp since it depended on libc++ (<iterator>).

libghostty-vt now only depends on libc.

Benchmark Results

Corpus Current HEAD median main median Delta vs main Notes
valid-mixed-1g-seed1.bin 9.245s 9.111s 1.5% slower Near tie; main remains slightly faster on fully valid input
malformed-mixed-1g-seed1-rate0.005.bin 9.251s 12.705s 37.3% faster Large improvement on malformed UTF-8 input

Approximate throughput from the medians:

  • Valid corpus: current HEAD 110.8 MiB/s, main 112.4 MiB/s
  • Malformed corpus: current HEAD 110.7 MiB/s, main 80.6 MiB/s

@mitchellh
Copy link
Copy Markdown
Contributor Author

I actually found a way to do replacement character decoding more in concert with simdutf. Our invalid utf8 path is probably a lot faster now, but will verify with benchmarks soon!

@mitchellh mitchellh force-pushed the push-ltnvwwrsowru branch 2 times, most recently from ea0c686 to 1985d03 Compare April 15, 2026 16:21
@mitchellh mitchellh marked this pull request as ready for review April 15, 2026 16:29
@mitchellh mitchellh requested a review from a team as a code owner April 15, 2026 16:29
@mitchellh mitchellh force-pushed the push-ltnvwwrsowru branch 4 times, most recently from 72d489d to 1e270b2 Compare April 15, 2026 16:48
This updates simdutf to my fork which has a SIMDUTF_NO_LIBCXX option
that removes all libc++ and libc++ ABI dependencies. 

From there, the hand-written simd code we have has been updated to also
no longer use any libc++ features. Part of this required removing utfcpp
since it depended on libc++ (`<iterator>`).

libghostty-vt now only depends on libc.
@mitchellh mitchellh merged commit 43a05dc into main Apr 15, 2026
178 of 182 checks passed
@mitchellh mitchellh deleted the push-ltnvwwrsowru branch April 15, 2026 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant