No description
Find a file
2025-09-21 14:54:18 +07:00
data first commit 2025-09-21 14:54:18 +07:00
po first commit 2025-09-21 14:54:18 +07:00
src first commit 2025-09-21 14:54:18 +07:00
.gitignore first commit 2025-09-21 14:54:18 +07:00
build.rs first commit 2025-09-21 14:54:18 +07:00
Cargo.lock first commit 2025-09-21 14:54:18 +07:00
Cargo.toml first commit 2025-09-21 14:54:18 +07:00
meson.build first commit 2025-09-21 14:54:18 +07:00
README.md first commit 2025-09-21 14:54:18 +07:00

Warp GUI

Một ứng dụng GNOME hiện đại được xây dựng với Rust, GTK4, và Libadwaita.

Tính năng

  • Thiết kế Adwaita hiện đại
  • 🦀 Được xây dựng với Rust để đảm bảo hiệu suất và an toàn
  • 🎨 Tích hợp GTK4 và Libadwaita
  • 📱 Giao diện đáp ứng và thích ứng
  • 🌍 Hỗ trợ đa ngôn ngữ

Yêu cầu hệ thống

Dependencies

  • Rust (edition 2021)
  • GTK4 (>= 4.12.0)
  • Libadwaita (>= 1.4.0)
  • GLib (>= 2.66)
  • Meson (>= 0.62.0)

Cài đặt dependencies trên Ubuntu/Debian:

sudo apt update
sudo apt install build-essential meson cargo rustc
sudo apt install libgtk-4-dev libadwaita-1-dev libglib2.0-dev

Cài đặt dependencies trên Fedora:

sudo dnf install meson cargo rust
sudo dnf install gtk4-devel libadwaita-devel glib2-devel

Cài đặt dependencies trên Arch:

sudo pacman -S meson cargo rust
sudo pacman -S gtk4 libadwaita glib2

Build và chạy

Build với Cargo (phát triển):

cargo build
cargo run

Build với Meson (production):

meson setup builddir
meson compile -C builddir
./builddir/src/warp-gui

Install system-wide:

meson setup builddir --prefix=/usr
meson compile -C builddir
sudo meson install -C builddir

Cấu trúc dự án

warp-gui/
├── Cargo.toml              # Rust package manifest
├── build.rs                # Build script cho resources
├── meson.build             # Meson build configuration
├── src/
│   ├── main.rs            # Entry point
│   ├── application.rs     # Application logic
│   ├── window.rs          # Window implementation
│   └── meson.build        # Rust build config
├── data/
│   ├── window.ui          # GTK4 UI template
│   ├── resources.gresource.xml
│   ├── *.desktop.in       # Desktop entry
│   ├── *.metainfo.xml.in  # AppStream metadata
│   ├── *.gschema.xml      # GSettings schema
│   └── icons/             # Application icons
└── po/                    # Translations

Phát triển

Kiến trúc

  • main.rs: Entry point, khởi tạo GTK và application
  • application.rs: Application logic, menu actions, window management
  • window.rs: Window implementation với UI bindings

Tính năng chính

  • Modern Adwaita design với AdwApplicationWindow
  • Template-based UI với GTK4 CompositeTemplate
  • Toast notifications với AdwToast
  • Action-based menu system
  • GSettings integration
  • Internationalization support

Thêm tính năng mới

  1. Thêm UI elements vào data/window.ui
  2. Bind elements trong window.rs imp struct
  3. Implement logic trong callback functions
  4. Update translations nếu cần

Testing

# Build và test
cargo build
cargo test

# Check với meson
meson test -C builddir

License

GPL-3.0-or-later

Đóng góp

  1. Fork repository
  2. Create feature branch
  3. Commit changes
  4. Push to branch
  5. Create Pull Request