Thanks to visit codestin.com
Credit goes to github.com

Skip to content
/ rio Public
forked from raphamorim/rio

A hardware-accelerated GPU terminal emulator powered by WebGPU, focusing to run in desktops, browsers, tvs and everywhere.

License

Notifications You must be signed in to change notification settings

Krishhhnaa/rio

 
 

Repository files navigation

Rio term

tl;dr: Rio is a terminal built to run everywhere, as a native desktop applications by Rust/WebGPU or even in the browser powered by WebAssembly/WebGPU.

Rio banner

Demo

Demo MacOs

Summary

About Rio

Website: https://raphamorim.io/rio

If you are using or want to help in any way please consider to donate via Github Sponsors.

Rio would not be possible without few acknowledgements and specially Alacritty, since a lot of Rio functionalities (e.g: ANSI parser, events, grid system) was originally written (and still uses a good amount) of Alacritty code.

A terminal application that's built with Rust, WebGPU, Tokio runtime. It targets to have the best frame per second experience as long you want, but is also configurable to use as minimal from GPU.

Below some of work in progress Rio's features:

  • Renderer based on Redux state machine.
  • WebAssembly plugin system.
  • Cross-platform.
  • Configurable (Render level, colors, icons, fonts).
  • Offloads rendering to the GPU for lower system load.
  • Uses threaded rendering for absolutely minimal latency.
  • Tabs support.

Rio renderer is based on redux state machine, lines that has not updated will not suffer a redraw. Looking for the minimal rendering process in most of the time. Rio is also designed to support WebAssembly runtime so in the future you will be able to define how a tab system will work with a WASM plugin written in your favorite language.

Rio uses WGPU, which is an implementation of WebGPU for use outside of a browser and as backend for firefox's WebGPU implementation. WebGPU allows for more efficient usage of modern GPU's than WebGL. More info

It also relies on Rust memory behavior, since Rust is a memory-safe language that employs a compiler to track the ownership of values that can be used once and a borrow checker that manages how data is used without relying on traditional garbage collection techniques. More info

Configuration File

The configuration should be the following paths otherwise Rio will use the default configuration.

  • macOS path: ~/.rio/config.toml

Default configuration of config.toml:

# Rio default configuration file
performance = "High"
height = 438
width = 662

[style]
font = "Firamono"
font-size = 16
theme = "Basic"

[advanced]
tab-character-active = ''
tab-character-inactive = ''
disable-renderer-when-unfocused = false

[developer]
enable-fps-counter = false
enable-logs = false

[colors]
background       = '#0F0D0E'
black            = '#231F20'
blue             = '#006EE6'
cursor           = '#F38BA3'
cyan             = '#88DAF2'
foreground       = '#F9F4DA'
green            = '#0BA95B'
magenta          = '#7B5EA7'
red              = '#ED203D'
tabs             = '#FFFFFF'
tabs-active      = '#FC7428'
white            = '#FFFFFF'
yellow           = '#FFFFFF'
dim-black        = '#FFFFFF'
dim-blue         = '#FFFFFF'
dim-cyan         = '#FFFFFF'
dim-foreground   = '#FFFFFF'
dim-green        = '#FFFFFF'
dim-magenta      = '#FFFFFF'
dim-red          = '#FFFFFF'
dim-white        = '#FFFFFF'
dim-yellow       = '#FFFFFF'
light-black      = '#FFFFFF'
light-blue       = '#FFFFFF'
light-cyan       = '#FFFFFF'
light-foreground = '#FFFFFF'
light-green      = '#FFFFFF'
light-magenta    = '#FFFFFF'
light-red        = '#FFFFFF'
light-white      = '#FFFFFF'
light-yellow     = '#FFFFFF'

performance

Set terminal WGPU rendering perfomance.

  • High: Adapter that has the highest performance. This is often a discrete GPU.
  • Low: Adapter that uses the least possible power. This is often an integrated GPU.

See more in https://docs.rs/wgpu/latest/wgpu/enum.PowerPreference.html

# <performance> Set WGPU rendering perfomance
# default: High
# options: High, Low
# High: Adapter that has the highest performance. This is often a discrete GPU.
# Low: Adapter that uses the least possible power. This is often an integrated GPU.
performance = "High"

height

Set terminal window height.

# <height> Set default height
# default: 438
height = 400

width

Set terminal window width.

# <width> Set default width
# default: 662
width = 800

Style

font

This property will change later to an actual font path. Currently Rio has 2 fonts builtin: Firamono, Novamono.

[style]
font = "Firamono"

font-size

Sets font size.

[style]
font-size = 16.0

Advanced

tab-character-active

This property sets a char for an active tab.

[style]
tab-character-active = ''

tab-character-inactive

This property sets a char for an inactive tab.

[style]
tab-character-inactive = ''

disable-renderer-when-unfocused

This property disable renderer processes until focus on Rio term again.

[style]
disable-renderer-when-unfocused = false

Developer

enable-fps-counter

This property enables frame per second counter.

[style]
enable-fps-counter = false

enable-logs

This property enables Rio logging.

[style]
enable-logs = false

Colors

Rio default colors:

Default colors

The image above was produced by coolors.co.

Usage example running the following bash script:

for x in {0..8}; do
    for i in {30..37}; do
        for a in {40..47}; do
            echo -ne "\e[$x;$i;$a""m\\\e[$x;$i;$a""m\e[0;37;40m "
        done
        echo
    done
done
echo ""

Or one-liner:

for x in {0..8}; do for i in {30..37}; do for a in {40..47}; do echo -ne "\e[$x;$i;$a""m\\\e[$x;$i;$a""m\e[0;37;40m "; done; echo; done; done; echo ""

Development Status

Basic features are under development for MacOs right now.

Platform Development Status
MacOs as desktop application In development 👷
Linux as desktop application In development 👷 *
Windows as desktop application Not started yet
Web Browser (tests on Chrome and Firefox) Not started yet
Nintendo Switch Not started yet

* Development and tests are targeting Wayland, probably is not stable on X11 yet.

Acknowledgments

About

A hardware-accelerated GPU terminal emulator powered by WebGPU, focusing to run in desktops, browsers, tvs and everywhere.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 99.3%
  • Other 0.7%