Hello all. I've started work on a clojure library for interoperating with C. It's always been a pain to do in Java but recently JNA (java native access) has taken away most of that pain. When using clojure however, it's nice to be able to stay in clojure and not drop to java (or C *shudder*). It's possible to use JNA from dynamic jvm languages already but those interfaces are slower and less type safe than the "direct mapping" way of doing things. Since I wanted this to be as fast and safe as possible but still clojure code only I have resorted to all kinds of voodoo, including bytecode generation and eval usage (oh the horror) so be warned :) Currently it is very rough but it can already handle all primitive types and also typed pointer arguments as nio buffers. I have included jna type support for structs, unions and callbacks (c function pointers) but that's completely untested yet.
Here it is: http://github.com/bagucode/clj-native
-- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en