Crates.io | rutty |
lib.rs | rutty |
version | 0.1.0 |
source | src |
created_at | 2023-06-03 10:13:15.131259 |
updated_at | 2023-06-03 10:13:15.131259 |
description | RuTTY - Rust TTY Server |
homepage | |
repository | https://github.com/papigers/rutty |
max_upload_size | |
id | 881524 |
size | 7,643,106 |
RuTTY (aka Ruthie) is a CLI-powered websocket server written in Rust that allows you to expose your commands via browser. RuTTY was written with the sole-purpose of me wanting to expermient with Rust.
RuTTY was heavily inspired by a very similar tool written in Go, called GoTTY.
RuTTY run a command for each client connection, forwards the TTY stdout to the client, and forwards the client input to the TTY stdin. RuTTY uses xterm.js to show a TTY display on the webpage.
To run rutty simply run rutty
and add your command and any optional arguments to that command, e.g. rutty vi test.txt
.
Option | Description | Default |
---|---|---|
-address (-a) | Server listening IP address | 0.0.0.0 (All interfaces) |
-port (-p) | Server listening port | 3000 |
-allow-write (-w) | Wether clients are allowed to pass input | false |
--title (-t) | HTML page title | RuTTY Server |
--reconnect (-r) | Automatic reconnection delay | None (no automatic reconnection) |
Clone the repository, install rust
, node
& yarn
.
Debug build: make build
.
Release build: make build release=1
cargo run -- <COMMAND> <ARGS>
An automatic hot-reload of the static files can be done by running yarn start
inside the web
directory, which will use parcel
to start a development server on http://localhost:1234 that is proxied to your RuTTY server running on port 3000.
MIT