For one thing, you don't have to use this module with C. Any language that supports exporting C-compatible functions will do – there's C++ of course, but also Rust, Go, D, Nim, and many many others.
LuaJIT also supports C-functions. It's FFI [0] will allow you to declare any C-compatible function or data structure, and then use it in normal Lua code.