Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

is it possible to write system level code in vala

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?

like image 607
Taylor Ramirez Avatar asked Feb 02 '26 22:02

Taylor Ramirez


2 Answers

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.

like image 104
nemequ Avatar answered Feb 04 '26 15:02

nemequ


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.

like image 31
Basile Starynkevitch Avatar answered Feb 04 '26 16:02

Basile Starynkevitch