Skip to content

AMAI-LABS/soul-terminal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

soul-terminal

GPU-accelerated rich terminal surface with terminal aesthetics. WASM-first (WebGL2/WebGPU in browser), also native (Vulkan/Metal/DX12).

Not a terminal emulator — a widget surface: monospace text grids, inline images, tooltips, themes, interactive elements.

Crates

Crate Description
soul-terminal Facade — re-exports everything
soul-terminal-core Types, style, theme, layout engine, widget trait, events
soul-terminal-widgets Text, CodeBlock, Button, Input, Container, ScrollView, Tooltip, Separator, Image
soul-terminal-render RenderBackend trait + wgpu implementation (quad/glyph/texture pipelines)
soul-terminal-app winit event loop for native + WASM entry point

Quick Start

[dependencies]
soul-terminal = "0.1"
use soul_terminal::*;

struct MyApp;

impl SoulAppHandler for MyApp {
    fn update(&mut self) -> Vec<Box<dyn Widget>> {
        vec![Box::new(
            Container::new("root")
                .with_gap(8.0)
                .add_child(Box::new(
                    TextWidget::new("title", "Hello, Soul Terminal!")
                        .with_font_size(24.0)
                        .with_bold(true),
                ))
                .add_child(Box::new(
                    CodeBlock::new("code", "fn main() {\n    println!(\"GPU-rendered!\");\n}")
                        .with_language("rust"),
                ))
                .add_child(Box::new(Button::new("btn", "Click Me"))),
        )]
    }
}

fn main() {
    let app = SoulApp::new(AppConfig::default());
    app.run(MyApp);
}

Architecture

soul-terminal (facade)
  ├── soul-terminal-core     (types, traits, layout, style, events)
  ├── soul-terminal-widgets  (Text, CodeBlock, Image, Container, Tooltip, etc.)
  ├── soul-terminal-render   (wgpu backend: quad SDF + glyphon text + texture atlas)
  └── soul-terminal-app      (winit native + WASM harness)

Rendering: wgpu (WebGL2/WebGPU in browser, Vulkan/Metal/DX12 native) + glyphon (cosmic-text text shaping) + SDF rounded corners in WGSL.

Layout: Flexbox-like engine with Direction, Align, Justify, gap, wrapping.

Themes: Dark/light with full syntax color palettes, serializable to/from JSON.

Widgets

  • TextWidget — styled multiline text
  • CodeBlock — syntax-colored code with line numbers
  • Container — flexbox layout container
  • Button — clickable with hover/press states
  • InputWidget — single-line text input with cursor
  • ScrollView — scrollable content with scrollbar
  • Separator — horizontal rule
  • Tooltip — hover popup
  • ImageWidget — GPU texture display

Building

# Native
cargo build
cargo run --example basic

# WASM
cargo build --target wasm32-unknown-unknown

# Tests (45 tests)
cargo test

Stack

  • wgpu 25 — cross-platform GPU abstraction
  • glyphon 0.9 — cosmic-text based text shaping
  • winit 0.30 — cross-platform windowing
  • bytemuck — zero-copy GPU buffer types
  • serde — theme serialization

License

MIT

Authors

AMAI Labs team@amai.net

About

22nd century browser-first rich terminal — GPU-accelerated widget surface with terminal aesthetics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors