Exeprimental visual terminal for egui

Related tags

Command-line eterm
Overview

eterm: a visual terminal for egui

Latest version Documentation unsafe forbidden Build Status MIT Apache

If you have a service written in rust (running on the cloud, or even locally) that you need to inspect, eterm might be for you.

By adding a few lines of rust to your service you can connect to it over TCP and get a visual terminal, allowing you to inspect apsects of the running process and/or configure it.

NOTE: This is work-in-progress!

How do I use eterm?

On the service you want to inspect you add the following:

let mut eterm_server = eterm::Server::new("0.0.0.0:8505")?;

…

eterm_server
    .show(|egui_ctx: &egui::CtxRef, client_id: eterm::ClientId| {
        egui::CentralPanel::default().show(egui_ctx, |ui| {
            ui.label("Some important stats");
            ui.checkbox(&mut some_option, "Option enabled");
        });
    });

This will listen for TCP connections on port 8505. You connect to it using eterm_viewer --url 127.0.0.1:8505.

How does it work?

The eterm_viewer captures mouse and keyboard input and send it to the server. The servers runs the gui code and collects what to draw and sends it back to the viewer, which displays it.

What is sent is not a picture of the rendered gui, but basic shapes such as rectangles, lines and text. This keeps the bandwidth use reasonably low, even though eterm sends the entire screen each frame (no delta-encoding!).

To save bandwidth, frames are only sent when there is change on screen.

Testing

cargo run --release --example game_server  &
cargo run --release -p eterm_viewer -- --url 127.0.0.1:8505

Limitations and future work

There is no authentication and no encryption.

The implementation is pretty basic so far, and is probably wasting a bit of CPU.

eterm uses no delta-encoding, so with visually intense scenes it can use a lot of bandwidth (> 1MB/s).

It would be nice to port the viewer to eframe so we can compile it for the web. Requires a Rust TCP library that works with web-sockets.

Screenshot

You might also like...
πŸ“ Soothing pastel theme for egui
πŸ“ Soothing pastel theme for egui

Catppuccin for egui Previews 🌻 Latte πŸͺ΄ FrappΓ© 🌺 Macchiato 🌿 Mocha Usage Add this to your Cargo.toml: [dependencies] catppuccin-egui = "1.0" To use

Sudoku Solver using bitmasks and bit-manipulation with Rust πŸ¦€ and egui 🎨

sudoku-solver Download This Rust application implements a very memory efficent algorithm to solve sudoku and lets the user know when a unique solution

A tiling layout engine for egui with drag-and-drop and resizing
A tiling layout engine for egui with drag-and-drop and resizing

egui_tiles Layouting and docking for egui. Supports: Horizontal and vertical layouts Grid layouts Tabs Drag-and-drop docking Trying it cargo r --examp

Slippy map (openstreetmap) widget for egui
Slippy map (openstreetmap) widget for egui

Slippy maps widget for egui. Limitations There are couple of limitations when using this library. Some of them will might probably be lifted at some p

Hotkey widget for egui!
Hotkey widget for egui!

egui-keybind, a hotkey library for egui crates.io | docs.rs | examples | changelogs This library provides a simple egui widget for keybindings (hotkey

A fast nostr opengraph server, built on nostrdb and egui.
A fast nostr opengraph server, built on nostrdb and egui.

notecrumbs A nostr opengraph server build on nostrdb, egui, and skia. It renders notes using the CPU in around 50ms. Status WIP! Local note fetching w

Show HTML content
Show HTML content "inside" your egui rendered application

hframe Show HTML content "inside" your egui rendered application. "hframe" stands for "HTML Frame". Note: hframe only works when the application is co

An egui app for prompting a local offline LLM.

An egui app for prompting a local offline LLM. Description coze is a small egui application for prompting a local offline LLM using the Huggingface ca

A terminal ASCII media player. View images, gifs, videos, webcam, YouTube, etc.. directly in the terminal as ASCII art.
A terminal ASCII media player. View images, gifs, videos, webcam, YouTube, etc.. directly in the terminal as ASCII art.

Terminal Media Player View images, videos (files or YouTube links), webcam, etc directly in the terminal as ASCII. All images you see below are just m

Owner
Emil Ernerfeldt
Rust coder at Embark Studios. Previously worked with physics simulation, games, 3D scanning and cyber security. I am @ernerfeldt on Twitter
Emil Ernerfeldt
A visual regex substitution tool

A visual regex substitution tool

Ilya Maximov 3 Feb 6, 2022
visual guide for writing Intrinsics(SIMD)

wasm-pack-template A template for kick starting a Rust and WebAssembly project using wasm-pack. Tutorial | Chat Built with ?? ?? by The Rust and WebAs

Ric Li 1 Apr 6, 2022
A visual novel engine written by Rust. Just Ayaka.

Ayaka Ayaka is currently a project for OSPP 2022. About the name The frontend is Ayaka. The runtime is Ayaka. The script is Ayaka. Just Ayaka. What we

UniGal 86 Dec 30, 2022
Stream-based visual programming language for systems observability

Stream-based visual programming language for systems observability. Metalens allows to build observability programs in a reactive and visual way. On L

Nikita Baksalyar 53 Dec 23, 2022
A visual studio code's workspaces organizer written in Rust

ruscode A visual studio code's workspaces organizer written in Rust Supports Linux, and Windows. What is a workspaces organizer? After months of or ev

ζ™§ζš 8 Dec 15, 2022
A visual node-based programming language

Stainless Script Stainless Script is a visual node-based programming language. The structure is as follows: program contains classes, objects (constan

null 4 Dec 15, 2022
Tight Model format is a lossy 3D model format focused on reducing file size as much as posible without decreasing visual quality of the viewed model or read speeds.

What is Tight Model Format The main goal of the tmf project is to provide a way to save 3D game assets compressed in such a way, that there are no not

null 59 Mar 6, 2023
Visual regression testing of H264 frames and images.

twenty-twenty The twenty-twenty library allows for visual regression testing of H.264 frames and images. It makes it easy to update the contents when

KittyCAD 4 Jul 16, 2023
A visual canvas and virtual machine for writing assembly to build cool things. Create machines and connect them together.

Visual Assembly Canvas A highly visual assembly editor, infinite canvas for wiring blocks and machines together, bytecode virtual machine runnable nat

Phoomparin Mano 31 Oct 11, 2023
A visual canvas and virtual machine for writing assembly to build cool things. Create machines and connect them together.

Visual Assembly Canvas A highly visual assembly editor, infinite canvas for wiring blocks and machines together, bytecode virtual machine runnable nat

Phoomparin Mano 32 Oct 11, 2023