By the way if anyone here is an FFI wizard, please email me... I have a
proposal for a unified way to structure the APIs of shared libraries so
they can be auto-loaded into any dynamic language implementation. So if
you have the shared library file, it will self-describe itself to the
high-level language in a standard format so the HLL programmer doesn't
have to write any bindings specific to that library. I thought of a way
to do this without inordinate changes to the way existing useful C
libraries are written, using things like OpenGL and libarchive as test
cases.
I'm largely out of my depth on that stuff so there may be some dumb
oversight but I can't think of any way it wouldn't work. I thought to
just email Kent Dybvig to ask whether the idea is stupid once I have
actually wrapped a couple of libraries.