ffi-generate on the fly