Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
169 commits
Select commit Hold shift + click to select a range
45e45d8
kitty protocol support - 1
Atan-D-RP4 Jun 13, 2025
eec7f82
kitty image protocol
raphamorim Aug 5, 2025
70f1a73
start metal support
raphamorim Sep 22, 2025
f312cab
update defaults
raphamorim Sep 22, 2025
ec99f70
update context to work with enum
raphamorim Sep 22, 2025
0a84008
split files to make easier to maintain
raphamorim Sep 22, 2025
56137af
add metal
raphamorim Sep 22, 2025
c179913
update deps
raphamorim Sep 22, 2025
1f57bb6
start split wgpu context
raphamorim Sep 23, 2025
4b4f3c7
update filters
raphamorim Sep 24, 2025
68211f4
work in progress (quad ok)
raphamorim Sep 24, 2025
0fd6b17
fix atlas and filters
raphamorim Sep 24, 2025
2393744
it builds now
raphamorim Sep 24, 2025
587c208
add quad metal not working yet
raphamorim Sep 24, 2025
1a4ee6e
prgress
raphamorim Sep 25, 2025
11f6255
remove unit_vertices_buffer
raphamorim Sep 25, 2025
2e7da46
scaled size
raphamorim Sep 25, 2025
75cb5d8
renders all now
raphamorim Sep 25, 2025
09f839e
add description
raphamorim Sep 25, 2025
3672a53
render something
raphamorim Sep 25, 2025
443d2d5
update rich_text but stops rendering
raphamorim Sep 26, 2025
6fe305b
let's goo
raphamorim Sep 26, 2025
2581227
fix background
raphamorim Oct 11, 2025
8929144
fix stuff
raphamorim Oct 11, 2025
a90ab3c
first attempt of unify
raphamorim Sep 26, 2025
60fec54
fixup! first attempt of unify
raphamorim Sep 26, 2025
f7fcfab
progress
raphamorim Sep 26, 2025
f14d885
fixup! progress
raphamorim Sep 26, 2025
aa2b455
fix examples
raphamorim Sep 28, 2025
3c96f1d
hack
raphamorim Oct 11, 2025
912eba3
clear some weird stuff
raphamorim Oct 14, 2025
5074eb8
cleanup
raphamorim Oct 14, 2025
c8f0bca
fix dimensions
raphamorim Oct 14, 2025
5f148ee
cleanup
raphamorim Oct 14, 2025
4c17069
cleanup
raphamorim Oct 14, 2025
4098d8f
remove logs
raphamorim Oct 15, 2025
2f10b1b
add haunted
raphamorim Oct 18, 2025
ba324ce
update it
raphamorim Oct 18, 2025
c1a6a64
change api to rect
raphamorim Oct 18, 2025
cecb748
Update rio-backend/src/ansi/kitty_graphics_protocol.rs
raphamorim Oct 18, 2025
e88eb35
Update rio-backend/src/ansi/kitty_graphics_protocol.rs
raphamorim Oct 18, 2025
6eb7e6d
Update rio-backend/src/ansi/kitty_graphics_protocol.rs
raphamorim Oct 18, 2025
ed7f738
remove layer
raphamorim Oct 18, 2025
ca9e323
Merge branch 'kitty-image-protocol' into sugarloaf-metal-support
raphamorim Oct 18, 2025
8ce702a
Fix Rust 2021 compatibility issues in kitty graphics protocol
raphamorim Oct 18, 2025
28705f6
wip kitty
raphamorim Oct 18, 2025
c8997fe
Breaking: as is default on MacOS (instead of ).
raphamorim Oct 18, 2025
ba1b655
Merge branch 'main' into v0.3.0
raphamorim Oct 18, 2025
3ae5528
fix cargo lock duplicated
raphamorim Oct 18, 2025
b447797
remove other navigations
raphamorim Oct 18, 2025
9529729
island
raphamorim Oct 18, 2025
2f9989e
update island
raphamorim Oct 18, 2025
6801f34
updates
raphamorim Oct 18, 2025
4116b47
wip island
raphamorim Oct 18, 2025
33edf2c
ok somewhere on term position
raphamorim Oct 18, 2025
dc053a6
wip palette
raphamorim Oct 18, 2025
ef7be61
update changelog
raphamorim Oct 19, 2025
4eca53d
fix image calculation
raphamorim Oct 19, 2025
df9fd4c
data about sixel
raphamorim Oct 19, 2025
d48ec0e
add tests?
raphamorim Oct 19, 2025
6cd62a7
wip kitty loading
raphamorim Oct 19, 2025
5eb8b93
investigating kitty image protocol, now works for some cases it's mis…
raphamorim Oct 21, 2025
ad9a477
shared memory
raphamorim Oct 21, 2025
3a79205
making it place correct and add tests
raphamorim Oct 22, 2025
2101b80
fix png/webp
raphamorim Oct 22, 2025
9f642f2
update changelog
raphamorim Oct 22, 2025
8d89533
graphics cell now can have background, let's freaking go
raphamorim Oct 22, 2025
28d1856
avoid double graphics cell check on unicode
raphamorim Oct 22, 2025
3956b7c
remove add_primitive_rect
raphamorim Oct 22, 2025
a5bf4fa
change architecture to coexist images and text
raphamorim Oct 22, 2025
236fbdb
Implement proper batching by atlas to avoid lifetime issues
raphamorim Oct 22, 2025
14bb041
remove double validation, also incorrect because had to check graphic…
raphamorim Oct 22, 2025
3cef74a
BlackLargeCircleMinusRightQuarterSection
raphamorim Oct 22, 2025
d3b06d0
use ref instead of mut
raphamorim Oct 22, 2025
5eb7c0e
need to fix drawablechars not being affected by font size
raphamorim Oct 22, 2025
41bcad1
change name to composer
raphamorim Oct 22, 2025
401307d
Merge branch 'main' into zero-dot-three
raphamorim Oct 22, 2025
3a53455
make it compile on non-macos (#1340)
itsjunetime Oct 23, 2025
d128547
fix macos build
raphamorim Oct 23, 2025
cb12d8d
step back on f16 for wgpu for now
raphamorim Oct 24, 2025
ba4db2c
apc start and end
raphamorim Oct 24, 2025
647c8c5
apc kitty on crosswords
raphamorim Oct 24, 2025
45ac863
avoid request unimplemented
raphamorim Oct 24, 2025
eed4b26
address some perf issues
raphamorim Oct 24, 2025
5b1cf84
use smallvec for kitty
raphamorim Oct 24, 2025
5a408fe
Merge main into zero-dot-three
raphamorim Oct 25, 2025
b118d84
Merge branch 'main' into zero-dot-three
raphamorim Nov 1, 2025
0b8f193
small cleanup
raphamorim Nov 1, 2025
2037e3e
ok sugarloaf now on grid
raphamorim Nov 1, 2025
0d64f7f
start blog post
raphamorim Nov 3, 2025
4f939cc
remove unnecessary log
raphamorim Nov 3, 2025
0428579
Merge branch 'main' into zero-dot-three
raphamorim Nov 3, 2025
4b06e64
simplify stuff and grow metal
raphamorim Nov 3, 2025
162111e
update changelog
raphamorim Nov 4, 2025
1fe9af3
Merge branch 'main' into zero-dot-three
raphamorim Nov 7, 2025
0a966d8
remove test_kitty_graphics.sh
raphamorim Nov 7, 2025
d357ba0
Merge branch 'main' into zero-dot-three
raphamorim Nov 7, 2025
f1f0998
fix: few cleanups on stuff
raphamorim Nov 7, 2025
71bfdc5
time to revamp term mod
raphamorim Nov 7, 2025
0b9bbd4
update README.md
raphamorim Nov 7, 2025
2a8a483
remove f16 for webgpu
raphamorim Nov 10, 2025
4a25668
cleanup rich text when removed
raphamorim Nov 11, 2025
9d21598
just flip instead of run everything
raphamorim Nov 11, 2025
3f289c6
rework island
raphamorim Nov 13, 2025
667681e
getting somewhere
raphamorim Nov 13, 2025
d922218
padding x as 10
raphamorim Nov 13, 2025
370f99b
update island
raphamorim Nov 13, 2025
31b4bea
use set_hide_if_single
raphamorim Nov 13, 2025
741155f
implement move_traffic_light
raphamorim Nov 13, 2025
c4267b1
new tabs
raphamorim Nov 13, 2025
9e16b63
rename composer to tab
raphamorim Nov 13, 2025
fc5891b
fix height for first tab
raphamorim Nov 13, 2025
4f611cf
remove is_macos_deadzone
raphamorim Nov 13, 2025
3f4430a
remove haunted from gitignore
raphamorim Nov 13, 2025
741a54d
refactor island
raphamorim Nov 15, 2025
990ccf0
double click to expand and change cursor
raphamorim Nov 15, 2025
90c3738
handle applications that enable mouse
raphamorim Nov 15, 2025
12a23c9
format code
raphamorim Nov 15, 2025
87f9205
Merge branch 'main' into zero-dot-three
raphamorim Nov 15, 2025
ea1c010
refactor sugarloaf api
raphamorim Nov 16, 2025
040ce04
update examples
raphamorim Nov 16, 2025
754a50a
Migrate frontend to new sugarloaf api (#1365)
raphamorim Nov 16, 2025
50cf1fe
progress bar
raphamorim Nov 18, 2025
2b78d35
Merge branch 'main' into zero-dot-three
raphamorim Nov 18, 2025
58534fa
update draw_layout
raphamorim Nov 18, 2025
c4456e1
simplify cache
raphamorim Nov 18, 2025
3265429
change text key to u64
raphamorim Nov 18, 2025
3100ca6
remove CacheStats
raphamorim Nov 18, 2025
7c3f291
reduce MAX_TEXT_RUN_CACHE_SIZE to 4096
raphamorim Nov 18, 2025
000391d
Merge branch 'main' into zero-dot-three
raphamorim Nov 18, 2025
1e57f2c
Merge branch 'main' into zero-dot-three
raphamorim Dec 5, 2025
276127f
match y position
raphamorim Dec 6, 2025
80a6a7e
Merge branch 'main' into zero-dot-three
raphamorim Dec 6, 2025
fc191c8
fix: remove is macos deadzone
raphamorim Dec 10, 2025
4383a3a
new padding api
raphamorim Dec 10, 2025
0a39166
add panel padding
raphamorim Dec 10, 2025
68cc4f1
remove PADDING
raphamorim Dec 10, 2025
d161f05
wip new layout system
raphamorim Dec 10, 2025
65960e0
simplify grid
raphamorim Dec 10, 2025
4b0e7d4
update changelog
raphamorim Dec 11, 2025
d1149e5
simplify some stuff in the changelog
raphamorim Dec 11, 2025
61ca59c
Merge branch 'main' into zero-dot-three
raphamorim Dec 11, 2025
2969eb1
cleanup trash
raphamorim Dec 12, 2025
69f146e
avoid scaling on rendering
raphamorim Dec 12, 2025
044c832
new margin api
raphamorim Dec 12, 2025
e2c00b8
rename to margin
raphamorim Dec 12, 2025
4508094
move to layout folder instead
raphamorim Dec 12, 2025
8844019
self.reset_panel_styles_to_flexible
raphamorim Dec 12, 2025
39a2b22
refactor cursor
raphamorim Dec 13, 2025
1ecdedc
few memory updates
raphamorim Dec 13, 2025
f8893b7
add split-active and default margin for panels
raphamorim Dec 13, 2025
9087b8f
add draw_order example
raphamorim Dec 13, 2025
8695c6b
scale margins
raphamorim Dec 13, 2025
4fe9b68
refactor to scaled margin
raphamorim Dec 13, 2025
d56f057
fix: to o(n)
raphamorim Dec 13, 2025
8d8415e
drop old key
raphamorim Dec 13, 2025
34767d4
fix click on panel
raphamorim Dec 13, 2025
6ab53a3
wip quad
raphamorim Dec 13, 2025
fadab4e
sdf antialising for curly
raphamorim Dec 15, 2025
e858f48
set screen and window background color when changed via OSC
aymanbagabas Dec 12, 2025
aff709b
update defaults
raphamorim Dec 15, 2025
1b4ffbb
Merge branch 'main' into zero-dot-three
raphamorim Dec 16, 2025
9eeef08
Merge branch 'main' into zero-dot-three
raphamorim Dec 20, 2025
5b44999
fix merge
raphamorim Dec 27, 2025
c65582b
Merge branch 'main' into zero-dot-three
raphamorim Jan 15, 2026
30cfad6
remove bench trash test
raphamorim Jan 22, 2026
40bbc76
Merge branch 'main' into zero-dot-three
raphamorim Jan 22, 2026
73da8c1
add contributing
raphamorim Jan 31, 2026
6f02be4
Merge branch 'main' into zero-dot-three
raphamorim Jan 31, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
221 changes: 143 additions & 78 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ memmap2 = "0.9.5"
url = "2.5.4"
criterion = { version = "0.6.0", features = ["html_reports"] }
dashmap = "6.1.0"
flate2 = "1.0"
lazy_static = "1.5"

[profile.release]
strip = "symbols" # See split-debuginfo - allows us to drop the size by ~65%
Expand Down
10 changes: 1 addition & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,7 @@
</p>
</p>

> **⚠️ Development Notice**: We are currently in the process of releasing Rio 0.3.0, which includes major performance improvements and architectural changes. The main branch is under active development and may be unstable. For stable usage, please use [v0.2.20 or below](https://github.com/raphamorim/rio/releases).

## About

Documentation: https://rioterm.com

If you are using or want to help in any way please consider to donate via [Github Sponsors](https://github.com/sponsors/raphamorim).

Rio would not be possible without [Alacritty](https://github.com/alacritty/alacritty/), since a lot of Rio functionalities (e.g: ANSI parser, events, processor) was originally written (and still uses a good amount) of Alacritty code.
Documentation: [rioterm.com](https://rioterm.com).

## Supporting the Project

Expand Down
16 changes: 0 additions & 16 deletions copa/examples/advanced_benchmark.rs
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,6 @@ fn detect_implementation() -> &'static str {

fn print_system_info() {
println!("Copa Parser Advanced Benchmark Suite");
println!("====================================");
println!();

let implementation = detect_implementation();
Expand Down Expand Up @@ -422,19 +421,4 @@ fn main() {
println!();
println!("Results exported to: {filename}");
}

println!();
println!("Usage Instructions:");
println!("==================");
println!();
println!("To compare performance between implementations:");
println!("1. Run on main branch: git checkout main && cargo run --example advanced_benchmark --release");
println!("2. Run on simd-utf8 branch: git checkout simd-utf8 && cargo run --example advanced_benchmark --release");
println!("3. Compare the generated JSON files or console output");
println!();
println!("For statistical analysis with criterion:");
println!(" cargo bench --bench parser_benchmark");
println!();
println!("For HTML reports:");
println!(" cargo bench && open target/criterion/report/index.html");
}
17 changes: 0 additions & 17 deletions copa/examples/benchmark_comparison.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,6 @@ fn run_chunked_test() -> BenchmarkResult {

fn print_system_info() {
println!("Copa Parser Performance Benchmark");
println!("=================================");
println!();

// Try to detect if we're using simdutf8 or std
let implementation =
Expand Down Expand Up @@ -287,19 +285,4 @@ fn main() {
/ real_world_tests.len() as f64;
println!(" Real-world scenarios: {real_world_avg:.2} MB/s average");
}

println!();
println!("Usage Instructions:");
println!("==================");
println!();
println!("To compare performance between implementations:");
println!("1. Run on main branch: git checkout main && cargo run --example benchmark_comparison --release");
println!("2. Run on simd-utf8 branch: git checkout simd-utf8 && cargo run --example benchmark_comparison --release");
println!("3. Compare the results manually or save outputs to files for analysis");
println!();
println!("For detailed statistical analysis:");
println!(" cargo bench --bench parser_benchmark");
println!();
println!("For HTML reports with graphs:");
println!(" cargo bench --bench parser_benchmark && open target/criterion/report/index.html");
}
133 changes: 132 additions & 1 deletion copa/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ impl<const OSC_RAW_BUF_SIZE: usize> Parser<OSC_RAW_BUF_SIZE> {
State::EscapeIntermediate => self.advance_esc_intermediate(performer, byte),
State::OscString => self.advance_osc_string(performer, byte),
State::SosString => self.advance_opaque_string(SosDispatch(performer), byte),
State::ApcString => self.advance_opaque_string(ApcDispatch(performer), byte),
State::ApcString => self.advance_apc_string(performer, byte),
State::PmString => self.advance_opaque_string(PmDispatch(performer), byte),
State::Ground => unreachable!(),
}
Expand Down Expand Up @@ -448,6 +448,75 @@ impl<const OSC_RAW_BUF_SIZE: usize> Parser<OSC_RAW_BUF_SIZE> {
}
}

#[inline(always)]
fn advance_apc_string<P: Perform>(&mut self, performer: &mut P, byte: u8) {
match byte {
0x00..=0x06 | 0x08..=0x17 | 0x19 | 0x1C..=0x1F => (), // Ignore control bytes
0x07 => {
// Bell-terminated APC
self.action_apc_end(performer);
self.osc_raw.clear();
self.osc_num_params = 0;
self.state = State::Ground;
}
0x18 | 0x1A => {
// C0 termination (CAN or SUB)
self.action_apc_put(performer, byte);
self.action_apc_end(performer);
performer.execute(byte);
self.osc_raw.clear();
self.osc_num_params = 0;
self.state = State::Ground;
}
0x1B => {
// Start of ST termination (\x1b\)
self.action_apc_end(performer);
self.osc_raw.clear();
self.osc_num_params = 0;
self.state = State::Escape;
}
0x3B => {
// Semicolon separates control data from payload
#[cfg(not(feature = "std"))]
{
if self.osc_raw.is_full() {
return;
}
}
self.action_apc_put(performer, byte);
self.action_osc_put_param(); // Reuse existing method to track parameter boundaries
}
0x2C => {
// Comma is part of the control data (separates key-value pairs)
// Don't create a parameter boundary
self.action_apc_put(performer, byte);
}
0x20..=0xFF => {
// Collect valid APC content (control data or payload)
self.action_apc_put(performer, byte);
}
}
}

#[inline(always)]
fn action_apc_put<P: Perform>(&mut self, performer: &mut P, byte: u8) {
#[cfg(not(feature = "std"))]
{
if self.osc_raw.is_full() {
return;
}
}
self.osc_raw.push(byte);
performer.apc_put(byte); // Optionally pass to apc_put for immediate processing
}

#[inline]
fn action_apc_end<P: Perform>(&self, performer: &mut P) {
// APCs are handled through apc_start/apc_put/apc_end hooks which properly
// accumulate large payloads. This function just calls apc_end() to complete the sequence.
performer.apc_end();
}

#[inline(always)]
fn advance_opaque_string<D: OpaqueDispatch>(&mut self, mut dispatcher: D, byte: u8) {
match byte {
Expand Down Expand Up @@ -865,6 +934,9 @@ pub trait Perform {
/// Dispatch an operating system command.
fn osc_dispatch(&mut self, _params: &[&[u8]], _bell_terminated: bool) {}

/// Dispatch an application program command.
fn apc_dispatch(&mut self, _params: &[&[u8]], _bell_terminated: bool) {}

/// A final character has arrived for a CSI sequence
///
/// The `ignore` flag indicates that either more than two intermediates
Expand Down Expand Up @@ -962,6 +1034,7 @@ impl<P: Perform> OpaqueDispatch for SosDispatch<'_, P> {
}
}

#[allow(dead_code)]
struct ApcDispatch<'a, P: Perform>(&'a mut P);

impl<P: Perform> OpaqueDispatch for ApcDispatch<'_, P> {
Expand Down Expand Up @@ -1715,6 +1788,64 @@ mod tests {
);
}

#[test]
fn parse_kitty_apc() {
const INPUT: &[u8] = b"\x1b_Gf=24,s=10,v=20;Zm9v\x1b\\";
let mut dispatcher = Dispatcher::default();
let mut parser = Parser::new();

parser.advance(&mut dispatcher, INPUT);

let expected = vec![
Sequence::OpaqueStart(OpaqueSequenceKind::Apc),
Sequence::OpaquePut(OpaqueSequenceKind::Apc, b'G'),
Sequence::OpaquePut(OpaqueSequenceKind::Apc, b'f'),
Sequence::OpaquePut(OpaqueSequenceKind::Apc, b'='),
Sequence::OpaquePut(OpaqueSequenceKind::Apc, b'2'),
Sequence::OpaquePut(OpaqueSequenceKind::Apc, b'4'),
Sequence::OpaquePut(OpaqueSequenceKind::Apc, b','),
Sequence::OpaquePut(OpaqueSequenceKind::Apc, b's'),
Sequence::OpaquePut(OpaqueSequenceKind::Apc, b'='),
Sequence::OpaquePut(OpaqueSequenceKind::Apc, b'1'),
Sequence::OpaquePut(OpaqueSequenceKind::Apc, b'0'),
Sequence::OpaquePut(OpaqueSequenceKind::Apc, b','),
Sequence::OpaquePut(OpaqueSequenceKind::Apc, b'v'),
Sequence::OpaquePut(OpaqueSequenceKind::Apc, b'='),
Sequence::OpaquePut(OpaqueSequenceKind::Apc, b'2'),
Sequence::OpaquePut(OpaqueSequenceKind::Apc, b'0'),
Sequence::OpaquePut(OpaqueSequenceKind::Apc, b';'),
Sequence::OpaquePut(OpaqueSequenceKind::Apc, b'Z'),
Sequence::OpaquePut(OpaqueSequenceKind::Apc, b'm'),
Sequence::OpaquePut(OpaqueSequenceKind::Apc, b'9'),
Sequence::OpaquePut(OpaqueSequenceKind::Apc, b'v'),
Sequence::OpaqueEnd(OpaqueSequenceKind::Apc),
Sequence::Esc(vec![], false, b'\\'),
];

assert_eq!(dispatcher.dispatched, expected)
}

#[test]
fn parse_kitty_apc_dispatch_params() {
// Test that commas in control data are NOT treated as param separators
// Only semicolons should separate control data from payload
const INPUT: &[u8] = b"\x1b_Gf=32,s=10,v=20;AQIDBA==\x1b\\";
let mut dispatcher = Dispatcher::default();
let mut parser = Parser::new();

parser.advance(&mut dispatcher, INPUT);

// Verify we got an APC dispatch
let apc_dispatch = dispatcher
.dispatched
.iter()
.find(|s| matches!(s, Sequence::OpaqueEnd(OpaqueSequenceKind::Apc)));
assert!(apc_dispatch.is_some(), "Should have APC dispatch");

// The test in performer::handler verifies the actual param parsing
// Here we just ensure the sequence completes correctly
}

#[test]
fn apc_c0_st_terminated() {
expect_opaque_sequence(
Expand Down
21 changes: 21 additions & 0 deletions docs/blog/2025-12-28-version-zero-dot-three.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
layout: post
title: 'Version 0.3 released'
date: 2025-12-28 12:28
description: 'Welcome to the new Rio Terminal experience'
categories: windows macos linux bsd
---

I am excited to announce Rio terminal v0.3 is released.

Let's break down this long-waited release in parts, also if you're not really a reading/blog person you can optionally watch this video about the release.

## New rendering architecture

## Native metal for MacOS

tl;dr

## Quake mode

## Tab mode
Loading
Loading