Libraries
Shared crates in libs/. Use them from any program in the workspace with a path dependency.
| Crate | For |
|---|---|
taunus-core | settings, paths, lifecycle, apps, shell control, passcode proof |
taunus-theme | the design system and apply!/attach! |
taunus-focus | the focus engine |
taunus-i18n | translations |
taunus-device | the device profile |
taunus-devtools | tdt layout |
taunus-net | Wi-Fi and Bluetooth |
taunus-llm | the on-device language model |
taunus-ringtones | ringtones |
taunus-camera | the camera viewfinder |
taunus-privacy | is the microphone, camera, location in use |
taunus-wallpaper | the wallpaper generator and its colours |
taunus-perf | frames per second |
taunus-kbd | on-screen keyboard layouts (shell) |
taunus-nav | the shell's navigation state machine |
taunus-wl | the shell's Wayland platform for Slint |
taunus-net
Wi-Fi (iwd) and Bluetooth (BlueZ) over D-Bus. start(on_event) runs a worker with its own system-bus connection
and returns a Net handle; events come back on the worker thread (forward them with
slint::invoke_from_event_loop).
let net = taunus_net::start(|ev| { /* Event::Wifi(..), Event::Bluetooth(..), Event::AskPassword(..), Event::AskPair(..) … */ });
net.wifi_scan();
net.wifi_connect(&path);
net.answer(Some(password)); // the password iwd asked for
net.bt_discover(true);
autopair pairs a remote or keyboard by itself on a TV (see the user guide).
taunus-llm
llama.cpp's llama-server as a child process on a loopback port; it dies with its owner, so the memory is free
again afterwards.
let model = taunus_llm::installed().ok_or("no model")?;
let server = taunus_llm::start_ready(model, "hello")?;
server.chat(&[("user".into(), "Hi".into())], "", &stop, |text| print!("{text}"))?;
MODELS lists the downloadable models, download(m, &stop, progress) fetches one, models_dir() is where they
live. Only one large model fits in memory: tell taunus-voice when you hold one.
taunus-ringtones
The built-in Chime and the sound files in /usr/share/taunus/ringtones (TAUNUS_RINGTONES elsewhere), with names
from their tags. Keep a ringtone by its id.
for r in taunus_ringtones::all() { println!("{} {}", r.id, r.name); }
let player = taunus_ringtones::Player::start(&id, "Alarm"); // loops until the Player is dropped
Never play sounds in tests.
taunus-camera
let weak = ui.as_weak();
let cam = taunus_camera::Viewfinder::start(move |state, frame| {
if let Some(ui) = weak.upgrade() {
ui.set_camera_state(taunus_camera::view_state!(CameraState, state));
if let Some(f) = frame { ui.set_camera_frame(f); }
}
});
Show it in the theme's CameraView. The camera runs while the Viewfinder lives: drop it as soon as the picture
is off screen. A closed cover or the privacy switch stop the sensor.
taunus-privacy
What the kernel says is in use (never what an app claims): mic_in_use, camera_active, gpsd_client,
GeoClue::in_use, Sensors::read(). The shell's privacy indicator uses it.
taunus-wallpaper
Generates the wallpaper on the device from a seed and derives the colour scheme. current_seed(); Look in
taunus-theme wraps it.