<feed xmlns='http://www.w3.org/2005/Atom'>
<title>sl0ppij.git/zellij-server/src/terminal_bytes.rs, branch main</title>
<subtitle>a sl0p.foo repository</subtitle>
<id>https://git.sl0p.foo/sl0ppij.git/atom/zellij-server/src/terminal_bytes.rs?h=main</id>
<link rel='self' href='https://git.sl0p.foo/sl0ppij.git/atom/zellij-server/src/terminal_bytes.rs?h=main'/>
<link rel='alternate' type='text/html' href='https://git.sl0p.foo/sl0ppij.git/'/>
<updated>2026-04-17T12:08:48Z</updated>
<entry>
<title>Some idle CPU and disk/io fixes, new CommandChanged plugin Event (#5063)</title>
<updated>2026-04-17T12:08:48Z</updated>
<author>
<name>Aram Drevekenin</name>
<email>aram@poor.dev</email>
</author>
<published>2026-04-17T12:08:48Z</published>
<link rel='alternate' type='text/html' href='https://git.sl0p.foo/sl0ppij.git/commit/?id=aa29cbaf6631af0afca6aae427a97b3e478393b3'/>
<id>urn:sha1:aa29cbaf6631af0afca6aae427a97b3e478393b3</id>
<content type='text'>
* initial implementation

* fix mouse cpu spam

* prevent excess metadata write and prune sessions on startup

* consolidate CommandChanged and PaneCommandChanged

* tests

* rustfmt

* add pr</content>
</entry>
<entry>
<title>[Windows port PR3] refactor: replace RawFd/AsyncFile, introduce platform-split PTY backend (#4722)</title>
<updated>2026-02-20T11:55:46Z</updated>
<author>
<name>divens</name>
<email>divens@users.noreply.github.com</email>
</author>
<published>2026-02-20T11:55:46Z</published>
<link rel='alternate' type='text/html' href='https://git.sl0p.foo/sl0ppij.git/commit/?id=767328df1531815f374dcfd94a956a3ddbe63563'/>
<id>urn:sha1:767328df1531815f374dcfd94a956a3ddbe63563</id>
<content type='text'>
* refactor: replace RawFd with i32 in debug_to_file

Replace the Unix-specific RawFd type with plain i32 in the debug_to_file
infrastructure. This removes the last RawFd usage from the cross-crate
debug logging API, making it platform-independent.

* refactor: cross-platform PTY abstraction with AsyncFd

Replace portable-pty with native openpty and introduce a platform-split
architecture for PTY operations:

- os_input_output_unix.rs: UnixPtyBackend with native openpty, AsyncFd-based
  epoll reader (no spawn_blocking per pane), signal handling via nix
- os_input_output_windows.rs: WindowsPtyBackend stubs (unimplemented)
- os_input_output.rs: shared ServerOsApi trait, ServerOsInputOutput composes
  PtyBackendImpl, build_command() extracts TerminalAction→RunCommand logic

Key changes:
- AsyncFd&lt;File&gt; replaces both tokio::fs::File (upstream) and spawn_blocking
  SyncReadAsyncReader (previous port) for zero-overhead epoll PTY reads
- orig_termios restored: openpty(None, &amp;orig_termios) passes parent's VERASE
- ServerOsApi returns Box&lt;dyn AsyncReader&gt; instead of Box&lt;dyn Read + Send&gt;
- TerminalBytes::new takes Box&lt;dyn AsyncReader&gt; directly
- NullAsyncReader replaces std::io::empty() for held panes
- Platform modules gated with #[cfg(not(windows))] / #[cfg(windows)]
- Removed portable-pty dependency, restored close_fds
- Added tokio "net" feature for AsyncFd

---------

Co-authored-by: divens &lt;divens.dev@gmail.com&gt;</content>
</entry>
<entry>
<title>Purge `async_std` from the codebase (#4672)</title>
<updated>2026-02-19T11:59:14Z</updated>
<author>
<name>har7an</name>
<email>99636919+har7an@users.noreply.github.com</email>
</author>
<published>2026-02-19T11:59:14Z</published>
<link rel='alternate' type='text/html' href='https://git.sl0p.foo/sl0ppij.git/commit/?id=3a9cf0a6d6b98dee0246e6fa5a539e1f6d546084'/>
<id>urn:sha1:3a9cf0a6d6b98dee0246e6fa5a539e1f6d546084</id>
<content type='text'>
* build(utils): Replace `async_std` with `tokio`

removing an entire async runtime from the dependency tree. `tokio` has
previously been required by `wasmtime` in any case, and the version of
async_std we used was ancient (1.3) and relied on unstable features.

* build(server): Remove `async_std` from the codebase

and replace it with `tokio` instead, which is already used by
`zellij-utils` and `wasmtime`.

* build(server): Remove dead dependency.

* fix: Don't keep an async runtime in the `zellij-utils` subcrate

but prefer to reuse an existing runtime from a caller instead. If no
such runtime exists, create an ephemeral runtime on the current thread
to run async tasks instead. Ideally, the functions needing the async
task would be async themselves, but these are called by the `Layout`
code based on a `ClientMsg`, and the code handling this currently lives
in `zellij-utils` and is sync itself. So, for the time being, there is
no way around this runtime requirement without a huge refactoring.

* refactor(server): Unclutter async tasks

in a few cases where either blocking code was called in an (unnecessary)
async task or an entire thread was spawned to block on the result of an
async task.

* docs(CHANGELOG): Mention PR 4672

* fix(server): Don't terminate when killing a panes children fails

but log the error and continue instead.

* feat: Add config option for number of async tasks to spawn

so users on machines with few resources can configure a task limit
without requiring recompilation.</content>
</entry>
<entry>
<title>performance(render): improve rendering performance by consolidating renders and introducing repaint_delay (#4100)</title>
<updated>2025-03-24T15:48:39Z</updated>
<author>
<name>Aram Drevekenin</name>
<email>aram@poor.dev</email>
</author>
<published>2025-03-24T15:48:39Z</published>
<link rel='alternate' type='text/html' href='https://git.sl0p.foo/sl0ppij.git/commit/?id=f3351f4f75dd1dc43f8808235553593bf87e68a0'/>
<id>urn:sha1:f3351f4f75dd1dc43f8808235553593bf87e68a0</id>
<content type='text'>
* initial draft

* style(comment): add explanation to async render

* remove timeouts from terminal_bytes

* some cleanups

* cleanups

* chore(docs): update pr</content>
</entry>
<entry>
<title>build: Don't re-export foreign crates in utils (#4087)</title>
<updated>2025-03-23T10:03:42Z</updated>
<author>
<name>har7an</name>
<email>99636919+har7an@users.noreply.github.com</email>
</author>
<published>2025-03-23T10:03:42Z</published>
<link rel='alternate' type='text/html' href='https://git.sl0p.foo/sl0ppij.git/commit/?id=6be8c495bcbdc2aa4fd4d6528b213ca8b6189b34'/>
<id>urn:sha1:6be8c495bcbdc2aa4fd4d6528b213ca8b6189b34</id>
<content type='text'>
* build(utils): Don't use reexported dependency

for internal code, but use the dependency directly.

* build(client): Don't use re-exports from `utils`

but turn `zellij-utils` dependencies into shared workspace dependencies
instead and specify those in `Cargo.toml` explicitly. This gives a much
better overview of what component in zellij uses which crates. The
previous approach hides a lot of this information since it looks like
crates are used in a single place where this isn't actually true.

* deps(tile): Don't use re-exports from zellij-utils.

* build(zellij): Don't use re-exports from zellij-utils.

* build(server): Don't use re-exports from zellij-utils.

* build(utils): Don't re-export foreign crates.

* docs: Update Changelog with PR #4087.

* style: Apply rustfmt.

* style: Apply rustfmt.

* build(e2e): Don't use re-export from zellij-utils.

* test: Restore e2e tests.

* style: Apply more formatting.</content>
</entry>
<entry>
<title>Fix compiler warnings (#4053)</title>
<updated>2025-03-10T16:50:20Z</updated>
<author>
<name>har7an</name>
<email>99636919+har7an@users.noreply.github.com</email>
</author>
<published>2025-03-10T16:50:20Z</published>
<link rel='alternate' type='text/html' href='https://git.sl0p.foo/sl0ppij.git/commit/?id=502af243e087523acd00fc2855625112c6a11728'/>
<id>urn:sha1:502af243e087523acd00fc2855625112c6a11728</id>
<content type='text'>
* chore(cargo): Update dependencies

for xtask subcommand to remove warnings about unknown compiler
attributes.

* deps(xtask): Remove `lazy_static`

as dependency, since the code we need can now be expressed using rusts
`std` builtin types.

* fix(xtask): Hide deprecated args

so the compiler doesn't complain about dead code any more.

* fix(xtask): Remove needless borrow.

* fix: Remove dead code

across the codebase, as discovered by the rust compiler.

* fix(server): Log previously ignored errors.

* fix(xtask): Remove needless `format!` calls.

* fix(xtask): Remove superfluous return statement.

* fix(client): Remove unused enum variant

from `ClientInstruction` and all code attached to it.

* fix(server): Restore functions needed in tests.

* chore: Apply rustfmt.

* fix(server): Add missing code.

* fix: Remove leftover warnings.

* CHANGELOG: Add MR #4026.

* fix(xtask): Pin `xshell` to version 0.2.2

because release 0.2.3 changed the way stdin is handled, breaking
interactive command invocations (such as we use).</content>
</entry>
<entry>
<title>fix(toolchain): Unbreak client startup</title>
<updated>2025-03-03T09:26:58Z</updated>
<author>
<name>har7an</name>
<email>99636919+har7an@users.noreply.github.com</email>
</author>
<published>2025-03-03T09:26:58Z</published>
<link rel='alternate' type='text/html' href='https://git.sl0p.foo/sl0ppij.git/commit/?id=736d43b138fea4e7bec6dfb6193e1370594886ff'/>
<id>urn:sha1:736d43b138fea4e7bec6dfb6193e1370594886ff</id>
<content type='text'>
This reverts commit 9f900a7325304a06d9e0913a8e661d7bbc86ad04.</content>
</entry>
<entry>
<title>Fix compiler warnings (#4026)</title>
<updated>2025-02-28T14:09:35Z</updated>
<author>
<name>har7an</name>
<email>99636919+har7an@users.noreply.github.com</email>
</author>
<published>2025-02-28T14:09:35Z</published>
<link rel='alternate' type='text/html' href='https://git.sl0p.foo/sl0ppij.git/commit/?id=9f900a7325304a06d9e0913a8e661d7bbc86ad04'/>
<id>urn:sha1:9f900a7325304a06d9e0913a8e661d7bbc86ad04</id>
<content type='text'>
* chore(cargo): Update dependencies

for xtask subcommand to remove warnings about unknown compiler
attributes.

* deps(xtask): Remove `lazy_static`

as dependency, since the code we need can now be expressed using rusts
`std` builtin types.

* fix(xtask): Hide deprecated args

so the compiler doesn't complain about dead code any more.

* fix(xtask): Remove needless borrow.

* fix: Remove dead code

across the codebase, as discovered by the rust compiler.

* fix(server): Log previously ignored errors.

* fix(xtask): Remove needless `format!` calls.

* fix(xtask): Remove superfluous return statement.

* fix(client): Remove unused enum variant

from `ClientInstruction` and all code attached to it.

* fix(server): Restore functions needed in tests.

* chore: Apply rustfmt.

* fix(server): Add missing code.

* fix: Remove leftover warnings.

* CHANGELOG: Add MR #4026.</content>
</entry>
<entry>
<title>Errors: Ignore errors from async when quitting (#1918)</title>
<updated>2022-11-12T10:18:15Z</updated>
<author>
<name>har7an</name>
<email>99636919+har7an@users.noreply.github.com</email>
</author>
<published>2022-11-12T10:18:15Z</published>
<link rel='alternate' type='text/html' href='https://git.sl0p.foo/sl0ppij.git/commit/?id=342d1629d08f429a8cb56150401f169c7f1e6b97'/>
<id>urn:sha1:342d1629d08f429a8cb56150401f169c7f1e6b97</id>
<content type='text'>
* utils/errors: Fix function order in `to_anyhow`

impl for `SendError`. Previously we attached the context to `anyhow!`,
which is wrong (because it doesn't create an `Err` type itself) and
leads to strange behavior where the error seemingly is immediately
panicked upon.

Instead, Wrap `anyhow!` into an `Err()` and then attach the context to
that. This achieves the intended goal and doesn't lead to premature
termination.

* server/terminal_bytes: Ignore error in `listen`

which occurs when quitting zellij with the `Ctrl+q` keybinding. At the
end of the `listen` function we break out of a loop and send a final
`Render` instruction to the Screen. However, when quitting zellij as
mentioned above, the Screen thread is likely dead already and hence we
cannot send it any Instructions. This causes an error in the async tasks
of the panes that handle reading the PTY input.

If we leave the error unhandled, we will have error messages in the log
whenever we quit zellij, even though the application exited normally.
Hence, we now send the final `Render` instruction but do not care
whether it is sent successfully or not.

This is a "workaround" for the fact that we cannot tell whether the
application is quitting or not.

* server/terminal_bytes: Add FIXME note

* changelog: Add PR #1918

don't log errors from async pane threads when quitting zellij</content>
</entry>
<entry>
<title>errors: Don't unwrap in `server::terminal_bytes` (#1876)</title>
<updated>2022-10-28T17:12:05Z</updated>
<author>
<name>har7an</name>
<email>99636919+har7an@users.noreply.github.com</email>
</author>
<published>2022-10-28T17:12:05Z</published>
<link rel='alternate' type='text/html' href='https://git.sl0p.foo/sl0ppij.git/commit/?id=60322e969f3eed39f64d7f2bf21878b6b454e154'/>
<id>urn:sha1:60322e969f3eed39f64d7f2bf21878b6b454e154</id>
<content type='text'>
* server/terminal_bytes: Don't unwrap

and return `Result`s instead, where appropriate.

* changelog: Add PR #1876

Don't unwrap in `zellij_server::terminal_bytes`.</content>
</entry>
</feed>
