Y901
A pure-Rust cross-platform GUI framework with its own Win32/D3D11, X11 and Web (wasm)
backends. Text uses a monospace cell model (0.5em × 1em), which makes it a good fit
for terminal-style desktop tools, log viewers and file managers.
中文说明 · Roadmap · Platform support · v0.5.0 notes (ready) · v0.4.0 (released)
Status
Experimental (0.x). Windows/D3D11 is the reference platform (Tier 1). Linux/X11 is supported on a best-effort basis (Tier 2). The browser backend is a demo/reach tier (Tier 3), not production-ready. macOS and Wayland have no backend. See docs/PLATFORMS.md for the exact support matrix and what is out of scope.
Install
[]
= "0.5.0"
y901 is the single entry point: it re-exports the ten y901-* implementation crates.
use *;
Quick start
The five-minute path (new project → running window) is in docs/QUICKSTART.md.
# Minimal facade example (depends on `y901` only)
# Component gallery (lives in y901-shell, hence -p)
Components
| Category | Widgets |
|---|---|
| Input | Button TextInput TextArea Checkbox RadioGroup Switch Slider |
| Layout | Flex (with radius/border) Grid Stack ScrollView SplitView Tabs |
| Data | Table ListView TreeView Image RichText TextLabel |
| Feedback | Spinner ProgressBar EmptyState ErrorState Alert |
| Navigation | Menu Dialog ContextMenu Tooltip |
Known limitations
- International text: partial, opt-in. The default build keeps the original cell
pipeline — one cmap glyph per character, laid out on the monospace cell grid. The
shapingfeature (off by default) adds a rustybuzz shaping pass, Unicode bidi (P2/P3 direction + visual reordering), grapheme-cluster segmentation and a platform fallback font chain (Windows: Segoe UI/Tahoma/YaHei/SimSun/Nirmala; Linux: DejaVu/Noto). Still not implemented: hyphenation, justification, kinsoku line breaking, emoji ZWJ sequence handling, per-run multi-face splitting, and any real-word validation of complex scripts. CJK renders because Han/Kana/Hangul mostly fit the "one wide glyph per two cells" contract — that is not full complex-text support. - Accessibility: semantics tree + AccessKit bridge.
Widget::semanticsexposes roles, labels, values, actions and state; the optionaly901-a11ycrate (facade featurea11y) maps that to AccessKit, with Windows UIA and Linux AT-SPI adapters behind features. Backend auto-wiring and screen-reader acceptance runs are not done yet. - Monospace-only text model.
cell_metrics_foralways derives cells at0.5em × 1em; the default font isNSimSun.FontConfig::modern()switches toMicrosoft YaHei UI, but proportional fonts are visual experiments only. - macOS and Wayland are out of scope. Wayland users run through XWayland.
- Browser backend (Tier 3). Single canvas, full-frame
putImageData, hidden-input IME with no candidate-window positioning, no multi-window/FileDrop. DOM semantics exist only behind the opt-ina11yfeature (a hidden ARIA mirror wired into the frame loop); it has not been validated in a real browser or with a screen reader. They901facade does build forwasm32;TerminalWidgetworks there too, butattach_shellreturns an error because a browser cannot spawn a process. - 0.x API. Breaking changes bump the minor version (0.3.0, 0.4.0 …) and ship migration
notes in
docs/RELEASE_NOTES_v*.md; published version numbers are never reused.
Repository layout (12 crates)
y901 single entry point: re-exports + prelude + create_runtime()
y901-core pure logic: terminal grid / cell widths / intervals
y901-ui framework: Widget / UiTree / layout / events / theme / animation / semantics
y901-a11y semantics -> AccessKit bridge (Windows UIA / Linux AT-SPI, behind features)
y901-widgets widgets: Button / Table / Alert / Switch / ...
y901-extras subsystem widgets: TerminalWidget (grid + VT + PTY)
y901-render software rasterizer + in-house TTF engine + atlas + text shaping
y901-runtime platform-agnostic contracts: Host / PlatformRuntime / frames / fonts
y901-backend-win32 Win32 + D3D11 + DirectWrite + IME + DPI
y901-backend-x11 X11 backend (Xvfb + real-server spot checks)
y901-backend-web browser backend (wasm32, single canvas)
y901-shell app shell: create_runtime() + clipboard + secrets + screenshots
Documentation
- docs/QUICKSTART.md — install, first window, next steps
- docs/PLATFORMS.md — support tiers and out-of-scope platforms
- docs/ROADMAP.md — plan for shaping, accessibility, API stability, components
- docs/A11Y_ACCEPTANCE.md — 10-minute screen-reader acceptance checklist (needs a human)
- docs/STATUS.md — current state, gates and evidence (Chinese)
- docs/FRAMEWORK.md — architecture, component model, rendering contract (Chinese)
- docs/CRATES_IO.md — release process and pitfalls (Chinese)
- docs/WASM.md — browser backend design and gaps (Chinese)
Internal design documents are written in Chinese; public entry points (README, quick start, platform matrix) are in English.
Reporting problems
This is a 0.x project with no support SLA, but reports are welcome and read:
- Bugs / feature requests — open an issue at
https://github.com/901548/y901/issues. Templates are provided; please include the
y901version, OS/backend (Win32 / X11 / Web) and a minimal reproduction. - Security issues — do not open a public issue. Use the repository's
Security → Report a vulnerability tab (see SECURITY.md). If that tab
is not available to you, open an issue titled
[SECURITY]with no details and you will be contacted privately. - Usage questions — same issue tracker,
questionlabel.
Contributing
See CONTRIBUTING.md (Chinese). CI enforces the full gate; PRs must also
keep cargo deny check green. The repository favours pure-Rust implementations: the
zero-C-dependency guard in crates/y901-shell/tests/no_c_deps.rs rejects -sys crates and
C/C++ build scripts.
License
Dual-licensed under either MIT or Apache-2.0, at your option.