To build an application that resides on a Raspberry Pi (but that we can test on our workstations) that hosts our indicator modules, we’ll need to employ a few techniques that we haven’t covered in this book yet. The requirements for our Generic Indicator Module System are as follows:
Load a WebAssembly module at launch and immediately run, controlling LEDs
Enforce a fixed frame rate for animated modules
Trap the SIGINT and SIGTERM signals, gracefully turning off active LEDs before shutdown
Hot Reloading—if a new module is copied into a monitored location, pause, then load the new module and continue
The application is designed to start and continue running forever, constantly getting new sensor ...