Skip to content

jeromegn/chat

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lunatic.chat

A telnet chat server written in Rust, running on Lunatic.

I wrote a blog post about the implementation, you can read it here.

Lunatic logo

 

If you just would like to try it out, join the hosted version with:

# US server
telnet lunatic.chat
# EU server
telnet eu.lunatic.chat

You should pick the one closer to you as all the rendering is done on the backend and lower latency will mean better UX.

Architecture

The server is written in Rust. The Rust code is then compiled to WebAssembly and runs on top of Lunatic. Each connection runs in a separate (lightweight) process, has it's own state and sends just a diff of esc-sequences back to the terminal to bring it up to date with the current render buffer.

Build & run instructions

If you have rustup installed:

# Add Rust nightly:
> rustup toolchain add nightly
# Add the wasm32-wasi target
> rustup target add wasm32-wasi
# Build the project
> cargo +nightly build

To run it, you will need to have lunatic on your PATH. If this is the case you can just run cargo +nightly run or find the generated telnet-chat.wasm file in the target folder and run it with lunatic path/to/telnet-chat.wasm.

Licence

MIT

About

A telnet chat server

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 100.0%