I don't understand why C FFI is that popular.

The amount of time it takes spent to write all the cffi stuff is the same amount it takes to write an executable in C and call it from python.

The only time cffi is useful is if you want to have that code be dynamic, which is a very niche use case.

Could you go into more detail? How would you build e.g. numpy without FFI?

These days you could probably build a pretty performant numpy like using shared memory with Arrow format and IPC for control. Though it would be considerably more complex and not at all easier than FFI...

You write the ffi once and let hundreds or thousands of other developers use it. For one off executables it rarely make sense.

Mixing the use with other libraries provided by the Python ecosystem is a another scenario. Do you really want to do HTTP in C or do you prefer requests?

We need the FFI to share memory in-process with C functions?