Small useful tools

Terminal text effects

Bring terminal animations to a Rust executable for shell pipelines.

Recorded result

Explore the example
█
From the example below.

Why I’m interested

Terminal animation fits naturally into a shell pipeline: give it text and get an effect without a larger application around it. I want a Rust port to keep the timing and character of the original effects while making startup and frame throughput easy to measure. Those measurements tell us what the port gains and where it gets slower.

Progress

The native Rust binary produced 30 print-effect frames with a fixed seed. Four stages appear below. Earlier performance work recorded a regression, so the next comparison measures the same effect in Rust and the original engine.

Follow the print effect frame by frame

Select four stages from the native Rust port and watch the text take shape.

Choose an example

A native ttfx print-effect frame

Text appears across a 24 × 3 canvas as the effect advances. These four stages come from the same native run with seed zero.

█
Selected frame
0
Captured frames
30

Input

MAKE SMALL THINGS
seed: 0
canvas: 24 × 3
effect: print

Result

                        
                        
█                       

A native ttfx print-effect frame

Text appears across a 24 × 3 canvas as the effect advances. These four stages come from the same native run with seed zero.

▒ ▓ ▓▓████████████
Selected frame
10
Captured frames
30

Input

MAKE SMALL THINGS
seed: 0
canvas: 24 × 3
effect: print

Result

▒                       
▓                       
▓▓████████████          

A native ttfx print-effect frame

Text appears across a 24 × 3 canvas as the effect advances. These four stages come from the same native run with seed zero.

MAKE░░░░░░▒▒▒▒▒▒▓
Selected frame
20
Captured frames
30

Input

MAKE SMALL THINGS
seed: 0
canvas: 24 × 3
effect: print

Result

                        
                        
MAKE░░░░░░▒▒▒▒▒▒▓       

A native ttfx print-effect frame

Text appears across a 24 × 3 canvas as the effect advances. These four stages come from the same native run with seed zero.

MAKE SMALL THINGS
Selected frame
29
Captured frames
30

Input

MAKE SMALL THINGS
seed: 0
canvas: 24 × 3
effect: print

Result

                        
                        
MAKE SMALL THINGS       

ttfx produced 30 frames in this recorded run. The page displays four of them. The next benchmark measures startup and frame throughput against TerminalTextEffects by ChrisBuilds.

Sources and reference notes

Upstream effect and engine

TerminalTextEffects by ChrisBuilds supplies the effect design. ttfx ports it to Rust under the MIT license.
Read the original source

What comes next

Reproduce the performance regression with the same input in both engines. Measure startup time and frame throughput.

Implementation and credits

How does a terminal effect build its output frame by frame?

Four recorded stages come from 30 native ttfx frames with fixed text, seed zero, and a 24 × 3 canvas.

Select four frames from the same print effect and follow the text as it appears.

The native Rust binary produces the frames. Rust exports the view and HTML controls select each stage.

ttfx ports TerminalTextEffects by ChrisBuilds under the upstream MIT license.

Back to the collection