soul-lang / SOUL

The SOUL programming language and API
Other
1.72k stars 95 forks source link

Documentation on HEART intermediate format #21

Closed ijsf closed 4 years ago

ijsf commented 4 years ago

Hi guys, I've been following the SOUL development for a while, and first off just want to say thanks for providing this project!

I've been reading the SOUL Project Overview, and this pretty much outlines a couple of strong points for SOUL that rely on SOUL at some point being able to run on bare-metal or a "SOUL-processor". What I grasp from this is the idea that SOUL could eventually run on hardware platforms through a software VM/JIT, or who knows at some point, a hardware VM or "SOUL-chip".

From what I can gather, SOUL code gets compiled into an intermediate language called HEART, which I assume is similar to other intermediate representations such as JVM bytecode, LLVM IR, or NVIDIA PTX. I'm assuming this IR currently gets translated into whatever supported target platform, e.g. C/C++ or WebAssembly.

Now, I'm pretty interested in trying to find out how one would go from SOUL to actual (embedded) bare-metal, and which routes would be feasible. I am therefore trying to find out more about the design and structure of the HEART intermediate format, so am looking for a specification or design document of some kind.

However, I cannot seem to find any documentation on HEART. Is the format not fixed yet, or is it perhaps proprietary? Perhaps I'm looking in the wrong place, or is this documentation simply not available yet?

Would love to hear more about HEART :)

P.S. If it would be better to repost this at the JUCE forum instead, I'd of course be happy to do so.

julianstorer commented 4 years ago

Yeah, this sort of question isn't really an "issue" so the forum might be a better place to chat about it.

But basically a) HEART is 99% stable but we're still being conservative about saying it's fully-baked b) We've been too busy to write the docs for it yet. It's easy enough to do, just takes a lot of time to write it all out. We'll do this as soon as we can!

It's very simple though, and you can probably figure out most of what you need to know if you use the soul generate --heart command line option to print some examples of it