是否可以在vala中编写系统级代码
是否可以在Vala中编写系统级源代码。 比如小型微内核操作系统? 或者在 Linux 内核中将其用于模块或设备驱动程序?
Is it possible to write system level source code in Vala.
like for a small Micro kernel OS?
or for use it in the Linux kernel for modules or device drivers?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
从技术上讲,是的,但实际上它可能不太实用。
人们以前用 Vala 编写过内核模块,但据我所知并没有什么真正严重的。实际上,有人使用 Vala 编写了一个 多重启动内核几年前。
您可以通过使用 posix 配置文件(pass --profile posix)来绕过对 GLib 的依赖,但它往往有点错误,并且不支持许多功能,包括许多使 Vala 中的编程成为一种功能的东西。愉快的经历。
Technically, yes, but in reality it's probably not very practical.
People have written kernel modules in Vala before, but AFAIK nothing really serious. Actually, someone wrote a Multiboot kernel using Vala a few years ago.
You can get around the dependency on GLib by using the posix profile (pass --profile posix), but it tends to be a bit buggy and lots of features aren't supported, including a lot of the stuff that makes programming in Vala a pleasant experience.
我不这么认为。 Vala 与 GObject 和 Glib gtype 类型系统(GTK 内部) - 包括其 基于引用计数的内存管理。 Linux 内核使用不同的(即使概念上相似)内存管理。在您的微内核操作系统中,您需要提供一个。
I don't think so. Vala is tied to the GObject and Glib gtype type system (inside GTK) - including its reference count based memory management. The Linux kernel uses a different (even if conceptually similar) memory management. And inside your microkernel OS, you need to provide one.
对上面答案的一些更新: posix 配置文件已从版本 0.17.4 的 vala 代码库中删除,因为它没有维护。 这里是公告。
Some update to the answers above: the posix profile has been deleted from vala codebase in version 0.17.4, because it was unmaintained. Here is the announcement.