#signal #reactive #frp #futures


Zero cost FRP signals using the futures crate

39 releases

new 0.3.32 Mar 18, 2023
0.3.31 Sep 10, 2022
0.3.30 Jul 24, 2022
0.3.24 Dec 29, 2021
0.1.0 Mar 18, 2018

#38 in Asynchronous

Download history 3009/week @ 2022-11-26 3362/week @ 2022-12-03 3044/week @ 2022-12-10 2777/week @ 2022-12-17 1841/week @ 2022-12-24 2522/week @ 2022-12-31 2903/week @ 2023-01-07 2528/week @ 2023-01-14 3555/week @ 2023-01-21 3283/week @ 2023-01-28 3832/week @ 2023-02-04 3542/week @ 2023-02-11 3177/week @ 2023-02-18 2875/week @ 2023-02-25 2315/week @ 2023-03-04 2070/week @ 2023-03-11

10,933 downloads per month
Used in 32 crates (19 directly)

MIT license

5.5K SLoC

crates.io docs.rs

This is a Rust crate that provides zero-cost FRP 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!

The best way to learn more is to read the tutorial.


~61K SLoC