#signal #reactive #frp #futures


Zero cost FRP signals using the futures crate

23 releases

0.3.16 Nov 24, 2020
0.3.15 Mar 16, 2020
0.3.12 Feb 22, 2020
0.3.8 Aug 28, 2019
0.1.0 Mar 18, 2018

#70 in Asynchronous

Download history 123/week @ 2020-11-10 126/week @ 2020-11-17 226/week @ 2020-11-24 274/week @ 2020-12-01 96/week @ 2020-12-08 89/week @ 2020-12-15 159/week @ 2020-12-22 63/week @ 2020-12-29 76/week @ 2021-01-05 69/week @ 2021-01-12 159/week @ 2021-01-19 111/week @ 2021-01-26 223/week @ 2021-02-02 144/week @ 2021-02-09 289/week @ 2021-02-16 97/week @ 2021-02-23

379 downloads per month
Used in 8 crates (7 directly)

MIT license

4.5K SLoC

crates.io docs.rs

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!


~41K SLoC