Commit Graph

7 Commits

Author SHA1 Message Date
Mitchell Hashimoto
2044e5030f terminal: make stream processing infallible
The terminal.Stream next/nextSlice functions can now no longer fail.
All prior failure modes were fully isolated in the handler `vt`
callbacks. As such, vt callbacks are now required to not return an error
and handle their own errors somehow.

Allowing streams to be fallible before was an incorrect design. It
caused problematic scenarios like in `nextSlice` early terminating
processing due to handler errors. This should not be possible.

There is no safe way to bubble up vt errors through the stream because
if nextSlice is called and multiple errors are returned, we can't
coalesce them. We could modify that to return a partial result but its
just more work for stream that is unnecessary. The handler can do all of
this.

This work was discovered due to cleanups to prepare for more C APIs.
Less errors make C APIs easier to implement! And, it helps clean up our
Zig, too.
2026-03-13 13:56:14 -07:00
Jacob Sandlund
807febcb5e benchmarks: align read_buf to cache line 2025-11-25 09:07:21 -05:00
Mitchell Hashimoto
4caefb807c terminal: fix up some performance issues with render state 2025-11-20 22:00:42 -08:00
Mitchell Hashimoto
5d85f2382e terminal: render state needs to preserve as much allocation as possible 2025-11-20 22:00:42 -08:00
Mitchell Hashimoto
7195cab7d3 benchmark: add RenderState to ScreenClone benchmark 2025-11-20 22:00:42 -08:00
Mitchell Hashimoto
2f49e0c902 remove screenclone test cause it leaks memory on purpose 2025-11-17 06:42:00 -10:00
Mitchell Hashimoto
9a46397b59 benchmark: screen clone 2025-11-17 05:08:19 -10:00