As suggested in #187 (comment):
I would say the biggest difficulty was the C standard library - it would be super cool to have a stdlib package, with bindings to the standard library. In the compiler/builtins.go file I wrote out the function signatures for a bit of the stdlib, but it would be awesome to automatically have bindings to the whole C stdlib.
Add a new irutil/stdlib package containing function (and global variable) declarations for interacting with the C standard library.
We should consider automatically doing this, perhaps using the LLVM compiler to parse the C standard library headers and generating LLVM IR function (and global variable) declarations.
Then, we could parse the LLVM IR output using llir/llvm/asm to get the llir/llvm/ir representation to interact with.
Will require some experimentation to find what approach works well, and is easy to work with.
Edit: related issues #22, #178, #180.
As suggested in #187 (comment):
Add a new
irutil/stdlibpackage containing function (and global variable) declarations for interacting with the C standard library.We should consider automatically doing this, perhaps using the LLVM compiler to parse the C standard library headers and generating LLVM IR function (and global variable) declarations.
Then, we could parse the LLVM IR output using
llir/llvm/asmto get thellir/llvm/irrepresentation to interact with.Will require some experimentation to find what approach works well, and is easy to work with.
Edit: related issues #22, #178, #180.