I've seen my first non-toy example of Emacs' FFI! https://emacs.stackexchange.com/q/28699/304 (works well, but distribution would be difficult)