Suggestions on compiling DSL to LLVM

Hello, Racketeers!

I am trying to implement a small DSL targeted to LLVM and am having trouble finding the right resources. I have looked into several LLVM projects, but most of them appear to be abandoned or lack sufficient documentation. Here are a few of the projects I have found:

This library looks promising, but there is no documentation available. There are two example languages included, but there are no so much comments on what they are intended to do.

This repository has an interesting N-body example, and the examples are explained. However, the repository is 10 years old and the LLVM API has changed significantly since then.

This is a very low level project, with not many examples.

Do you know of any other projects or tutorials that could be useful? Any suggestions are welcome. Thank you!

2 Likes

An approach that I briefly looked into was to generate LLVM assembler text and run llvm-as, llc, and as to generate a binary. This avoids having to deal with the FFI and the changing LLVM API.

1 Like

Well, you suggest to not to use bindings at all? I thought, maybe, someone has used sham language or something similar.