It does seem like primary goals of Tinycc are simplicity and speed, and adding such a feature might 
impact those goals.  However, the functionality Kevin originally asked for would be generally 
useful, without bringing the baggage of a fairly large dependency (like SWIG or clang).  It's 
interesting to consider how layering Tiny C into distinct compile phases (with an API) and maybe 
adding a formalized AST would impact performance.  (My guess is that a separate project would be 
better, but I think there is room between "Tiny C" and "Giant Crufty C".)

Another idea specific to Kevin's situation would be, if someone was so 
inclined, to make a stand-alone tool using the Tiny C code as a basis, with 
unneeded code stripped out.  I did a similar thing with Femtolisp, when I 
needed an S-expression reader/printer but not the other stuff.  Tiny C is a 
small enough project to wrap your head around and do something like this--and 
still have code which is maintainable.

Arnold wrote:

TCC is the wrong tool for the job. Look into SWIG, which already
does this for a number of langauges.

Kevin Ingwersen via Tinycc-devel <[email protected]>  wrote:

Quick and short question: Can I use libtcc to extract symbol information
(types, functions, structs, enums, unions) from a C header so that I can
then use it to generate a wrapper? My goal is to automate the process
of C interop generation for the V language, which uses TCC as one of
the mainly supported compilers - so the source is already accessible
even from a standard V installation, hence my thought of possibly taking
advantage of that to generate wrappers



_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to