#signal #reactive #frp #futures

futures-signals

Zero cost FRP signals using the futures crate

14 releases

✓ Uses Rust 2018 edition

0.3.7 Jul 23, 2019
0.3.5 Apr 27, 2019
0.3.4 Feb 24, 2019
0.3.0 Dec 21, 2018
0.1.0 Mar 18, 2018

#64 in Asynchronous

Download history 3/week @ 2019-04-09 2/week @ 2019-04-16 16/week @ 2019-04-23 18/week @ 2019-04-30 14/week @ 2019-05-07 38/week @ 2019-05-14 30/week @ 2019-05-21 13/week @ 2019-05-28 37/week @ 2019-06-04 77/week @ 2019-06-11 45/week @ 2019-06-18 158/week @ 2019-06-25 54/week @ 2019-07-02 34/week @ 2019-07-09 19/week @ 2019-07-16

184 downloads per month
Used in 2 crates

MIT license

191KB
3.5K SLoC

This is a Rust crate that provides zero-cost Signals which are built on top of the futures crate.

Hold on, zero-cost? Yup, that's right: if you don't use a feature you don't pay any performance cost, and the features that you do use are as fast as possible. Signals are very efficient.

What is a Signal? It is a value that changes over time, and you can be efficiently notified whenever its value changes.

This is useful in many situations:

  • You can automatically serialize your program's state to a database whenever it changes.

  • You can automatically send a message to the server whenever the client's state changes, or vice versa. This can be used to automatically, efficiently, and conveniently keep the client and server's state in sync.

  • A game engine can use Signals to automatically update the game's state whenever something changes.

  • You can easily represent continuous input (such as the current temperature, or the current time) as a Signal.

  • If you create a GUI, you can use Signals to automatically update the GUI whenever your state changes, ensuring that your state and the GUI are always in sync.

  • You can use dominator to create web apps and automatically keep them in sync with your program's state.

  • And many more situations!

Dependencies

~1MB
~21K SLoC