The SDK
Implement KoboApp, describe screens declaratively, and the runtime handles layout, e-ink refresh planning, Back navigation and lifecycle.
Apps don't open device resources; they ask. Network, storage, audio, frontlight and Wi-Fi are capability-gated, and a refusal comes back as a value the app can handle.
- E-ink UI
- Text, tiles, dialogs, keyboards, pagination, partial refresh planning
- Simulators
- Browser and runtime simulators with layout diagnostics
- Async work
- HTTPS, ranged downloads, cancellable tasks, scheduled wakes
- State
- Atomic per-app keyed storage
- Shipping
- Signed static ARMv7 binaries, published when an app PR merges
kobo new my-app
cd my-app
kobo dev
use kobo_sdk::{
ActionId, Context, KoboApp, ScreenBuilder,
};
#[derive(Default)]
struct Hello { taps: u32 }
impl KoboApp for Hello {
fn on_start(&mut self, ctx: &mut Context) {
self.show(ctx);
}
fn on_action(
&mut self, ctx: &mut Context, a: ActionId,
) {
if a == kobo_sdk::action_id("tap") {
self.taps += 1;
}
self.show(ctx);
}
}
impl Hello {
fn show(&self, ctx: &mut Context) {
let screen = ScreenBuilder::new("hello")
.top_bar("Hello")
.heading(format!("{} taps", self.taps))
.button("tap", "Tap me")
.build();
ctx.set_screen(screen);
}
}
fn main() {
let app = Hello::default();
let _ = kobo_sdk::run("hello", app);
}