#pixelflut #pixel #server #display #connect #client #whatever

pixelflut-rs

A library providing a pixelflut server to easily connect your display or project to it

4 releases (2 breaking)

0.2.0 Dec 27, 2020
0.1.1 Nov 22, 2020
0.1.0 Nov 18, 2020
0.0.1 Nov 11, 2020

#5 in #whatever

MIT license

26KB
392 lines

Crates.io License GitHub Workflow Status

pixelflut.rs

A library providing a Pixelflut server to easily connect your display or whatever to it.

What is Pixelflut?

Pixelflut uses a very simple (and inefficient) ASCII based network protocol. You can write a basic client in a single line of shell code if you want, but you only get to change a single pixel at a time. If you want to get rectangles, lines, text or images on the screen you have to implement that functionality yourself. That is part of the game.

Pixelflut Protocol

  • HELP: Returns the available commands.
  • SIZE: Returns the size of the visible canvas in pixel as SIZE <w> <h>.
  • PX <x> <y>: Return the current color of a pixel as PX <x> <y> <rrggbb(aa)>.
  • PX <x> <y> <rrggbb(aa)>: Draw a single pixel at position (x, y) with the specified hex color code. If the color code contains an alpha channel value, it is blended with the current color of the pixel.

You can send multiple commands over the same connection by terminating each command with a single newline character (\n).

Example

To get a better understanding on how this library should be used, please take a look at the really simple example (Warning 😱 no fancy bling bling 😢).

Dependencies

~3–10MB
~96K SLoC