No description
| data | ||
| po | ||
| src | ||
| .gitignore | ||
| build.rs | ||
| Cargo.lock | ||
| Cargo.toml | ||
| meson.build | ||
| README.md | ||
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
- Thêm UI elements vào
data/window.ui - Bind elements trong
window.rsimp struct - Implement logic trong callback functions
- 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
- Fork repository
- Create feature branch
- Commit changes
- Push to branch
- Create Pull Request