Crates.io | touchpage |
lib.rs | touchpage |
version | 0.2.2 |
source | src |
created_at | 2016-12-29 04:00:58.851109 |
updated_at | 2019-10-17 17:46:10.44724 |
description | control panel server with shared-state web controls |
homepage | https://github.com/bburdette/touchpage |
repository | https://github.com/bburdette/touchpage.git |
max_upload_size | |
id | 7835 |
size | 358,232 |
Configurable web controls with shared state. Overview/tutorial here
The idea is to have a simple way to configure a set of touch enabled buttons, sliders, and labels, which are presented on a web page. When the user manipulates the controls, websocket messages are sent to the server, which updates internal state, updates all clients with the new changes, and passes the events to your rust program. The library user can also change the control state, which is reflected in the clients.
As of 0.2.0, touch controls are configurable from rust, instead of having to edit an undocumented json file. Check the example folder for that, and other usage details.
The elm code is already compiled into js, so there's no need to compile just to use it. But if you do want to change the elm code, the elm build requires ambr, part of the amber cargo package. Install that with 'cargo install amber'.
From the project directory, use ./build-elm.sh to build the elm and make an index.html to use in the example project. You'll have to change the example main.rs a little to use it. Run the rust server with ./runit.sh. So to sum up:
0) cargo install amber
1) cd elm/
2) ./build-elm.sh
3) cd ../example
4) cargo build
5) ./runit.sh