3 ms·
Show HN: Rust chat client (with GUI) and server on Mac and FreeBSD using WebSockets
I'm learning Rust and put this together from sample code over a few days. Rust is incredibly fun (I normally work with Go and Swift). My goal is to see if I can put the client on a development board running xBSD and use a touchscreen for input.
Client
https://github.com/zkirill/thor
Server
https://github.com/zkirill/odin
You need Rust 1.7.0 and Cargo 0.9.0 to compile. The package for FreeBSD doesn't currently go that high so you need to use a port (instructions at https://gist.github.com/zkirill/4fb42b4ba4b7cc58c4f0)
Packages of interest:
* IO (epoll, kqueue) used by the server to handle many WebSocket connections on the same thread. See bottom of the MIO README for performance comparisons to other implementations: https://github.com/carllerche/mio
* WebSocket server dependent MIO: https://github.com/housleyjk/ws-rs
* WebSocket client: https://github.com/cyderize/rust-websocket
* GUI (connects to X or Wayland): https://github.com/PistonDevelopers/conrod
- seren 11y agoWhat what your experience with conrod ? Piston seems to go in lots of different direction, I wonder if it is a mature library.
- zkirill 11y agoIt was a humbling experience coming from Cocoa Touch to say the least. I think it's still early but Piston seems to be working very hard on it (in addition to various other graphics backend for Rust). From what I can tell a lot of the foundational stuff still needs to be built, particularly around layout. The situation with font rendering is also unclear to me because they might be moving away from Freetype (https://github.com/PistonDevelopers/conrod/issues/695 https://github.com/PistonDevelopers/conrod/issues/695). Qt is an "alternative" to Conrod but it seems that there is a complexity issue with Rust trying to bind to what Qt has created on top of C++. I consider myself very spoiled by UIKit but I didn't find any alternatives to Conrod so it's the project I will be contributing to and developing with. Feel free to message me if you want a more in-depth breakdown.