archives

[Newbie] Where can I learn about VM / C interfacing?

Hi all,
I worked through EOPL (1st edition) and consequently can write interpreters/(simple) byte code virtual machines for simple languages.

Now I'd like to learn how to interface these interpreters/vms to libraries written in C. Most scripting languages seem to have some kind of FFI and I am eager to learn how to interface my (admittedly toy) languages to existing libraries.

Can anyone point me at books/papers etc that deal with this aspect?

Is it necessary for the interpreter/vm to be written in C to interface with a library written in C? (If this is a dumb question, please do not hesitate to correct me. I am very much a newbie).

Any pointers to something that tells me "How to interface an interpreter/VM with C libraries" (or something that comes close) is greatly appreciated.

Ideally someone has written a book that deals with these aspects but *any* pointers are fine! I am totally flummoxed.

Thanks in advance,
Ravi

Well?!

A public service announcement directed to the LtU editorial team:

I am extremely busy (and tired), but what's your excuse for not posting? :-)

Last chance to post something cool before the holidays...