diff options
| author | divens <divens@users.noreply.github.com> | 2026-02-20 12:55:46 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-02-20 12:55:46 +0100 |
| commit | 767328df1531815f374dcfd94a956a3ddbe63563 (patch) | |
| tree | bc10dda921839c764b34afb983e1da9334d9f7c8 /zellij-utils/src/plugin_api/plugin_command.rs | |
| parent | fix: go to welcome screen when opening web root (#4736) (diff) | |
| download | sl0ppij-767328df1531815f374dcfd94a956a3ddbe63563.tar.gz sl0ppij-767328df1531815f374dcfd94a956a3ddbe63563.tar.xz sl0ppij-767328df1531815f374dcfd94a956a3ddbe63563.zip | |
[Windows port PR3] refactor: replace RawFd/AsyncFile, introduce platform-split PTY backend (#4722)
* 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<File> replaces both tokio::fs::File (upstream) and spawn_blocking
SyncReadAsyncReader (previous port) for zero-overhead epoll PTY reads
- orig_termios restored: openpty(None, &orig_termios) passes parent's VERASE
- ServerOsApi returns Box<dyn AsyncReader> instead of Box<dyn Read + Send>
- TerminalBytes::new takes Box<dyn AsyncReader> 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 <divens.dev@gmail.com>
Diffstat (limited to 'zellij-utils/src/plugin_api/plugin_command.rs')
0 files changed, 0 insertions, 0 deletions
