Resolves the 4 P3 items in docs/rewrite/notes/review-rv13-codex.md (final-Z16.md): - async-backend now takes effect like Ghostty: ghostty_os::xev ports libxev's backend detection (io_uring, then epoll); global init detects and logs it, the GTK startup applies the config with Zig's messages, and +version reports the real backend. The termio IO loop runs on a new reactor with epoll, io_uring (io-uring crate) and poll(2) (kept for macOS, where libxev uses kqueue). The 21 exec integration tests run under every backend; io_uring was exercised here. - auto-update-channel defaults to the build's release channel. - Windows error names: sharing violation -> AccessDenied, plus ERROR_FILE_EXISTS -> PathAlreadyExists and virus errors -> AntivirusInterference, mirroring std.os.windows.OpenFile's NTSTATUS mapping in Zig 0.15.2 (verified against its source by the orchestrator). - Exact ports of std.fs.path.basenameWindows/basenamePosix for theme name validation (drive, UNC and device roots). Test Plan: - cargo test --workspace --no-fail-fast (3555 passed, exit 0) - just check-macos (both), just check-windows, just check-wasm - +show-config --default --docs vs /usr/bin/ghostty (only the build-specific gtk-opengl-debug line differs)
59 lines
1.7 KiB
Rust
59 lines
1.7 KiB
Rust
//! ghostty-termio: see docs/rewrite/ARCHITECTURE.md for the module map.
|
|
//!
|
|
//! Linux, with a Windows (ConPTY) port behind `cfg(windows)` (the `*_windows.rs`
|
|
//! files, selected with `#[path]`). Ported: `pty.zig`, `Command.zig`, the `terminfo/*` source
|
|
//! generator and everything in `termio/` (`Options`, `backend`, `message`,
|
|
//! `mailbox`, `Termio`, `Thread`, `Exec`, `stream_handler`,
|
|
//! `shell_integration`). See `docs/rewrite/notes/ghostty-termio-IO1.md` and
|
|
//! `ghostty-termio-IO2.md`.
|
|
//!
|
|
//! This crate may use limited `unsafe` (fork/exec in `command`, a few
|
|
//! async-signal-safe libc calls in `pty`); everything else is safe.
|
|
|
|
#![cfg_attr(
|
|
test,
|
|
allow(
|
|
clippy::unwrap_used,
|
|
clippy::assert_is_empty,
|
|
clippy::items_after_statements
|
|
)
|
|
)]
|
|
|
|
pub mod backend;
|
|
#[cfg_attr(windows, path = "command_windows.rs")]
|
|
pub mod command;
|
|
#[cfg_attr(windows, path = "exec_windows.rs")]
|
|
pub mod exec;
|
|
pub mod mailbox;
|
|
pub mod message;
|
|
pub mod options;
|
|
#[cfg_attr(windows, path = "pty_windows.rs")]
|
|
pub mod pty;
|
|
#[cfg(unix)]
|
|
pub mod reactor;
|
|
pub mod shell_integration;
|
|
pub mod sinks;
|
|
pub mod state;
|
|
pub mod stream_handler;
|
|
pub mod terminfo;
|
|
pub mod termio;
|
|
pub mod thread;
|
|
#[cfg_attr(windows, path = "wakeup_windows.rs")]
|
|
pub mod wakeup;
|
|
/// Pure Windows `CreateProcessW` input encoders (tested on every host).
|
|
pub mod windows_args;
|
|
|
|
pub use backend::Backend;
|
|
pub use command::Command;
|
|
pub use exec::Exec;
|
|
pub use mailbox::Mailbox;
|
|
pub use message::Message;
|
|
pub use options::Options;
|
|
pub use pty::{Pty, Winsize};
|
|
pub use sinks::{RendererMailbox, SurfaceMailbox};
|
|
pub use state::{SharedState, SharedStateExt, State, TerminalGuard};
|
|
pub use stream_handler::StreamHandler;
|
|
pub use termio::{DerivedConfig, Termio};
|
|
pub use thread::Thread;
|
|
pub use wakeup::Wakeup;
|