|
From: | Kon Lovett |
Subject: | Re: [Chicken-users] Using c code from interpreted code |
Date: | Sun, 7 Jan 2007 18:12:36 -0800 |
<snip>
In general there is never a reason to use the inline egg. (It is very nifty but for your purpose overkill.) In fact the easiest way to access a "foreign" library from Chicken is to use SWIG.Ok for not using inline.For SWIG, I agree it might be the easiest way but I'm not sure I like it. I used it for writing opengl and glut bindings for ruby and it generatedmore code than hand written bindings.
Yes.
It makes me wonder another thing : with chicken, we wrap c code in scheme (either the whole code, or only call to c functions) but in ruby, we makes the bindings from the c side, up to ruby (i.e. we write c code that corresponds tothe way ruby is implemented). Although I prefer the chicken way (and don't see any reason to want to not do so), is-it possible to do the other way ?
Sort of. There is no support for it. See runtime.c & chicken.h in the Chicken source.
There is support for calling compiled Scheme from C though. C->Scheme- >C->... is possible. Chicken is a compiler & libraries so it can be used in an embedded fashion.
Thank you, mt
[Prev in Thread] | Current Thread | [Next in Thread] |