O'Reilly logo

Programming WebAssembly with Rust by Kevin Hoffman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Hosting Indicator Modules on a Raspberry Pi

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required