In the special purpose for computation (like Numba) department, but more general: TorchScript from PyTorch
https://pytorch.org/docs/stable/jit_language_reference.html#...
It doesn't compile to C but to an IR, but some ideas around typing might be similar.