TheDan64 / inkwell

It's a New Kind of Wrapper for Exposing LLVM (Safely)
https://thedan64.github.io/inkwell/
Apache License 2.0
2.38k stars 229 forks source link

Question: writing a backend with inkwell? #515

Open nihalpasham opened 4 months ago

nihalpasham commented 4 months ago

I’m new to LLVM. I was wondering if we can use Inkwell to write a backend for a very simple target, such as a tiny micro-controller. Are there any limitations to being able to put together a complete backend using (just) Inkwell? For example, does it lack TableGen support or have missing APIs in the backend pipeline?

PS: I couldn’t find a discussions tab, so I’m posting here. Please let me know if this isn’t the right place for this question.

TheDan64 commented 4 months ago

We can only support what LLVM exposes through their C API, I'm not aware of any backends that aren't exposed though.

Also, a discussions tab is a good idea, and I'll add that for future use!

nihalpasham commented 4 months ago

We can only support what LLVM exposes through their C API, I'm not aware of any backends that aren't exposed though.

Got it. Hmm, I was really hoping to learn how compiler backends work by putting one together in Rust (and avoid having to use C++)

nihalpasham commented 4 months ago

In case, you'd like this to the first discussion. :)

https://docs.github.com/en/discussions/managing-discussions-for-your-community/moderating-discussions#converting-an-issue-to-a-discussion