gioser

tawasuyu/llimphi

Sovereign retained-mode GPU UI framework in Rust (wgpu+vello+taffy+parley), Elm loop, 40+ widgets.

Rust 229TOML 101Markdown 82Shell 24052 Sutichaykuna

⎇ main modules/selector/README.md Markdown · 40 siq'ikuna · 1.5 KB Ñawpa willay ch'uya

chore: refresco desde el monorepo — 27 crates nuevos (anim, lottie, svg, mesh, image, layer, test, wire-view, widgets rag-sidebar/router/lazy-list/rive-button) y sync de los 95 existentes 93253cc22 · Sergio ·

1# llimphi-module-selector
2
3An "open/save" abstraction portable between the host (filesystem paths) and wawa
4(khipus by hash).
5
6## Why
7
8A tawasuyu app that only knows paths (`PathBuf`) breaks on wawa, where storage is
9content-addressed (BLAKE3 + DAG) and there is no such thing as a
10"/home/user" folder. But most apps do not need to know the difference: they only
11want to ask "which item does the user want to open" or "where do I save this
12blob".
13
14This crate exposes:
15
16- The `Selector` trait with two methods: `list_candidates()` (to build the
17  picker's UI) and `realize(handle)` (to resolve the chosen item to bytes).
18- An opaque `ItemHandle` — the app must not inspect it, only hand it back to the
19  selector.
20- `HostSelector` with a root path and an extension filter (the real impl).
21- `WawaSelector` as a **placeholder** with the API defined — the real integration
22  with `akasha` / `wawa-kernel` happens when the suite starts running in-cage.
23  For now it exports the types and panics if invoked, which is fine: the code
24  that builds it stays compilable and apps can type against the trait.
25
26## Minimal API
27
28```ignore
29use llimphi_module_selector::{HostSelector, Selector};
30
31let sel = HostSelector::new("/home/usr/docs", &[".pluma", ".khipu"]);
32let items = sel.list_candidates()?;
33// (the app shows `items.iter().map(|i| &i.display_name)` in its picker)
34// the user picks index N:
35let bytes = sel.realize(&items[N].handle)?;
36```
37
38---
39
40Part of **llimphi** — see [llimphi](../../README.md).

README.md

llimphi-module-selector

An "open/save" abstraction portable between the host (filesystem paths) and wawa (khipus by hash).

Why

A tawasuyu app that only knows paths (PathBuf) breaks on wawa, where storage is content-addressed (BLAKE3 + DAG) and there is no such thing as a "/home/user" folder. But most apps do not need to know the difference: they only want to ask "which item does the user want to open" or "where do I save this blob".

This crate exposes:

Minimal API

use llimphi_module_selector::{HostSelector, Selector};

let sel = HostSelector::new("/home/usr/docs", &[".pluma", ".khipu"]);
let items = sel.list_candidates()?;
// (the app shows `items.iter().map(|i| &i.display_name)` in its picker)
// the user picks index N:
let bytes = sel.realize(&items[N].handle)?;

Part of llimphi — see llimphi.