One Piece of C Code, Five Pitfalls Each for Flutter and KMP

One Piece of C Code, Five Pitfalls Each for Flutter and KMP

34 lines of C bound twice, through Flutter’s ffigen and KMP’s cinterop. Under AOT both call in near 0.1us. KMP’s debug build made struct returns 30x slower until release fixed it. Five pitfalls each, led by a version wall and a silently empty binding file.

2026-11-13 · 8 min · 1601 words · Trevor Wang