Developing applications
For now, the application and the OS are basically the same thing. An application is flashed directly onto the device, and some parts of the application logic can be customized by editing the scripts.
An application is usually split in two parts: the application logic and the device-specific part. This allows us to share the application logic across several devices, such as a desktop computer and a SmolPhone device.
The application logic is located in the os/smolphone_apps crate.
The device-specific code is located in a _examples crate:
- The
os/smolphone_examplescrate contains applications that can be run on a desktop computer. - The
device/workspace contains applications for the SmolPhone device. - The
picocalc/picocalc_examplescrate contains applications for the PicoCalc device.
An application consists of a deck of cards. Each card describes an application screen. A card is a tree of widgets and is split into a configuration and a state. The configuration doesn’t change and is part of the program binary. Conversely, the state can change during the execution of the program. It is stored in the volatile memory. The widget layout is part of the configuration.