[Vala] An extension of radare's PosixVala to non-[Compact] classes



Hi all,

Radare's Posixvala is a cool thing that can be used with the standard Vala
compiler. It removes references to GLib and GObject, and transplants in its
own minimal headers to supply code for necessary GLib functions in the
produced source.
It can handle [Compact] classes basically, and produces binaries which do
not rely on GLib or GObject at runtime, just standard libc - which *is*
pretty neat.

I've managed to extend it a bit.  By adding in bits of Mono's eglib (small
experimental GLib implementation), bits from real GLib, and some modified
bits from the real GObject library, I've managed to take this approach to
where we can now compile classes without the [Compact] annotation.  :)

The repo is a goddamn mess right now.  But I suspect that Vala with only
libc runtime dependency is either something you're interested in or you're
not, and if you are interested, you would probably like the link.

You can find my fork at: https://github.com/leafi/posixvala/

(The biggest problem right now is that none of the types are added in
gtype.c's init function right now, as I didn't want to port the files.
 Minimal Vala programs seem to work, but I doubt GObject-based libraries
from elsewhere will.

Also I didn't implement any mutexes because for my own purposes a
dependency on libpthread would be bad, but you'll probably want to do this
for programs with >1 thread.  Won't be hard, just rip code from
glib/gthread-unix.c.)

If anyone is feeling keen, it would be great to get more forks for
different purposes/some of the missing features implemented/actually test
what works and what doesn't.

Have fun,
Merlyn.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]