|
From: Martin D. <mar...@gm...> - 2013-10-09 07:06:25
|
Hi,
I'm working on rust bindings to wx, based on the (wonderful!) wxc
layer exposed by wxhaskell. When starting on the wxdirect equivalent,
it struck me that it was wasteful for everyone to be parsing the .h
files - instead, wxc could consist of both the header files and some
sort of serialised data structure (e.g. json):
C file:
TClassDefExtend(wxTimerEx,wxTimer)
void wxTimerEx_Connect( TSelf(wxTimerEx) _obj,
TClass(wxClosure) closure );
TClass(wxTimerEx) wxTimerEx_Create( );
TClass(wxClosure) wxTimerEx_GetClosure( TSelf(wxTimerEx) _obj );
parsed data:
class: wxTimerEx
parent: wxTimer
methods: [
{ c_fn: wxTimerEx_Connect
name: Connect
return_type: void
args: [[wxClosure, closure]]
},
...
]
What do you think? Would this add an unnecessary extra burden? I
figure the data structure is in memory at some point anyway, so
dumping it to a file shouldn't be too much of a problem.
martin
|