A more ergonomic and elegant API
Is your feature request related to a problem? Please describe. Llama does not seem to be receiving any more new updates. It has a much more pleasant API than Inkwell, perhaps Inkwell can adopt some of its designs.
Thanks for pointing out Llama. Didn't know about it. Is there anything in particular you had in mind? A lot of their design looks to be based on inkwell
Their function creation code (in the README example) is much more cleaner.
Llama neglects a lot of type-safety here:
- You can provide any
TypetoFuncType::new, even types that are not valid to be there. - Params passed to
addaren't guarenteed to be integers, and would fail IR validation. Inkwell guarentees this upfront
declare_function taking a closure is kinda cool, but forces assumptions on you about basic blocks. Looking at the example, it's not even clear to me how do you manage basic blocks.
I think something like this would be better served as an abstraction ontop of inkwell, rather than changing inkwell to be less concrete