various work in progress on ffi and some preemptive cleanup
max’s ffi wrapper generator tool. should explore adapting it once the ffi / api stabilizes