It can be done. I think the issue had to do with getting the macros to work in R6RS libraries. I did redo the define-c-info macro into a R6RS library as a syntax-case macro.
Since that time I think(?) Larceny has added additional capability regarding its native explicit-renaming(?) macros inside R6RS libraries. So other approaches might work as well. My version of Larceny's FFI inside R6RS Libraries are here. http://github.com/GreyLensman/rl3/tree/75c05ae3c3e838dace63c18d4c5a95590ed304bb/rl3/ffi Examples of use are here: Sockets: http://github.com/GreyLensman/rl3/tree/75c05ae3c3e838dace63c18d4c5a95590ed304bb/rl3/io/net/sockets.sls EPoll: http://github.com/GreyLensman/rl3/tree/75c05ae3c3e838dace63c18d4c5a95590ed304bb/rl3/io/epoll.sls The last caveat is the code is Linux specific. If you are on Windows for examples you would have to add back a few cond-expands from Larceny's native version into my ported version. I'm open to any and all options regarding the RL3 code. On Sat, 2008-05-24 at 21:49 -0500, Peter Keller wrote: > On Wed, May 21, 2008 at 06:14:29PM -0400, William D Clinger wrote: > > That'd be great. Larceny does indeed have an FFI, > > which is somewhat documented but not well documented. > > See http://larceny.ccs.neu.edu/doc/ and specifically > > http://larceny.ccs.neu.edu/doc/user-manual.chunked/ar01s10.html#id2559833 > > So, after some hacking and getting a basic sqlite3 ffi done for r5rs in > larceny, I've come to realize that functions like (foreign-procedure > ...) and friends don't seem to exist at all when running larceny in > -r6rs mode. > > Is it even possible to build C interfaces in r6rs libraries in larceny? At > this point, I'm stuck. > > Thank you. > > -pete > > _______________________________________________ > Larceny-users mailing list > Larceny-users@lists.ccs.neu.edu > https://lists.ccs.neu.edu/bin/listinfo/larceny-users _______________________________________________ Larceny-users mailing list Larceny-users@lists.ccs.neu.edu https://lists.ccs.neu.edu/bin/listinfo/larceny-users