A comprehensive reimplementation of tmux in Rust.
Project details
ztmux offers a complete reimplementation of tmux, crafted in Rust to enhance performance and reliability. This project brings the full multiplexer experience—server, client, and all components—while maintaining full compatibility with tmux, ensuring a seamless transition for users.
ztmux: A Rust-Based tmux Superset
ztmux is an advanced terminal multiplexer reimplemented from the ground up in Rust, providing a fully functional alternative to tmux. Unlike being a simple wrapper or control mode interface, ztmux serves as a complete multiplexer, encompassing both server and client while maintaining compatibility with tmux's core functionality.
100% Functional: ztmux mirrors the functionality of tmux, allowing users to split panes, detach and reattach sessions, and script interactions seamlessly. The implementation has achieved 1656/1656 gated parity cases passing, confirming accurate behavior alongside tmux.
Performance: Ideal for developers seeking a modern, efficient alternative to the traditional C-based implementation, with performance metrics that remain competitive.
Robust Documentation: Comprehensive documentation is available here for users wanting to dive deeper into functionalities, installation processes, and performance comparisons.
Custom Extensions: ztmux supports a suite of original subcommands and extensions that are not available in tmux, enabling users to enhance their workflow with live dashboards, JSON-emitting inspectors, and more. The extension framework allows for easy integration and scripting.
ztmux was developed using best practices for Rust development, emphasizing safety and correctness with the following highlights:
Performance benchmarks indicate that while ztmux may carry a marginally larger memory footprint, it offers equivalent response times for common operations, such as starting a new session or executing commands. The following table summarizes key performance aspects versus tmux:
| Measurement | ztmux | tmux | Ratio |
|---|---|---|---|
Cold start (new-session -d) | 25.42 ms | 24.73 ms | 1.03x |
Warm round trip (list-sessions) | 10.55 ms | 9.37 ms | 1.13x |
| Server RSS, 1 window | 6272 KiB | 4160 KiB | 1.51x |
| Server RSS, 20 windows | 6464 KiB | 4192 KiB | 1.54x |
Developers and users are encouraged to contribute to ztmux, report bugs, and explore its capabilities. More detailed information is available in the documentation and the source repository.
Comments
0Start the conversation
Share the first comment.