vala
// ExampleApp.vala
public class ExampleApp : Gtk.Application {
public ExampleApp () {
Object (application_id: "com.example.App");
}
public override void activate () {
var win = new Gtk.ApplicationWindow (this);
var btn = new Gtk.Button.with_label ("Hello World");
btn.clicked.connect (win.close);
win.child = btn;
win.present ();
}
public static int main (string[] args) {
var app = new ExampleApp ();
return app.run (args);
}
}
// Compile command (requires gtk4 package to be installed):
// valac --pkg gtk4 ExampleApp.vala为什么选择 Vala?
- 性能
- Vala 将代码编译成极快的、完全原生的二进制文件。 您还可以在 Vala 程序中重用现有的 C 代码,以及从 Vala 生成 C 代码。
你能开发什么?
- 图形用户界面应用程序
- GTK、Libadwaita 和 Granite 的完美集成让开发变得超级简单。轻松在 Flathub 上发布您的应用程序,而无需臃肿的包。
- 命令行应用程序
- 使用大型标准库并使用可在 Vala 中使用的大量其他库。
- 库
- 无需手工处理即可为许多其他语言和 API 文档提供绑定。 此外,还支持动态和静态链接。
博客

ValaBot: an AI coding assistant fine-tuned for Vala
Sam Cowen
Vala: the smoothest C off-ramp
Reuben Thomas
print("Hello Planet GNOME");
Lorenz WildbergCurrent Versions
- Vala 0.56.17 (Stable Long-term Support)
- Vala main (Development)
作品展示
TubaBrowse the Fediverse
WorkbenchLearn and prototype with Vala and other GNOME technologies
DinoA modern open-source chat client for the desktop. Focuses on providing a clean and reliable Jabber/XMPP experience while having your privacy in mind.
MonitorManage processes and monitor system resources
TextSnatcherCopy Text from Images with ease, Perform OCR operations in seconds.
TimeshiftSystem restore tool for Linux. Creates filesystem snapshots using rsync+hardlinks, or BTRFS snapshots.
CrownCrown is a complete and cross-platform game engine designed for flexibility, performance, and fast-iterations.
社区
社交媒体
在这些平台上关注 Vala 项目