lightweight struct handling in FFI?