Making a FFI

Hi there, I’m starting to look into making a Foreign Function Interface for my toy compiler so I can call C functions and hopefully start trying to access the LLVM api from my language. What is the best way to start going about this? Or if they’re a good article/resource to look at?