TheDan64 / inkwell

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

More examples? #432

Open vivekascoder opened 1 year ago

vivekascoder commented 1 year ago

Can we plz have more examples?

EricLBuehler commented 1 year ago

Perhaps links to projects that use Inkwell could be added? In my opinion, a real use case is the best example :)

vivekascoder commented 1 year ago

True, that would be wonderful.

Pat-Lafon commented 1 year ago

Can I shamelessly plug a mini-project of mine? https://github.com/sampsyo/bril/tree/main/bril-rs/brillvm Assuming you already have a frontend, it shows how to use the Inkwell bindings to compile your IR to LLVM or execute it via the jit.

Probably a bit on the simpler side for people more familiar with LLVM.

It does show off a few cool things:

Critiques appreciated!

EricLBuehler commented 1 year ago

@Pat-Lafon, that really looks interesting!

Currently, I am developing Kestrel, a programming language similar to Rust, with a rich type system and safety guarantees, but a different view on generics. The major things Kestrel demonstrates with relation to Inkwell are:

However, I would also like to mention to the old Kestrel. It has the basic features of a programming language - and a trait-based type system. However, although it checks ownership and mutability and references, it is unsafe as it does not check lifetimes. This is what the "new" Kestrel seeks to solve. Regardless, the old Kestrel demonstrates:

TheDan64 commented 1 year ago

Happy to accept PRs to list more examples

Dominilk commented 8 months ago

self-plug: https://github.com/Dominilk/llvmbf

small llvm frontend for brainf*ck esoteric language