Re: [Vala] Vala - generates code at runtime



hi,
the  simpliest way i've found - to make .so libraries, but that is not
the way i wanted to use them, dynamic linking , etc..
you want to have add functions and reload module without recompiling?


Hi all,

I'm wondering what would be the "right" way to generates
code/classes at runtime, and reload it into the running program.
I thought to use the modules/plugin approach
(http://live.gnome.org/Vala/TypeModules) the following way :
- generate code than can be reloaded (plugin code, [ModuleInit]) using some kind of StringBuilder
- flush it to a file
- compile this file either by forking a valac compiler or perhaps
using directly libvala (possible ?)
- reload the resulting plugin binary into the app

There's probably a better way to accomplish this kind of task.

Any idea / suggestion ?

Thanks for helping :)





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