tinygo-site
tinygo-site copied to clipboard
add tinygo tool pipeline illustration
I created this a while ago for a talk. I think it may be of interest for someone who has no idea what tinygo does behind the scenes, no?
I think that looks very cool! @aykevl needs to confirm accuracy, but looks correct to me?
We would also be well served by similar diagram showing the WASM/WASI compilation differences...
This looks cool! Some remarks:
- CGo is at the correct place, but note that it is done by TinyGo, not by the Go libs. This isn't clear from the diagram. (Not sure whether this is something that needs to be fixed).
- go-llvm is just a shim around LLVM, it doesn't really do anything itself. The more relevant package would be the compiler package (./compiler in the TinyGo source tree) - but then all of this is part of the compiler so saying "compiler" is not very descriptive.
- "Machine code" used to be correct there, but we're now emitting LLVM bitcode in many cases which is then optimized further in the linker (ThinLTO). Not sure how to express that though. For some architectures (wasm in particular), we're not using ThinLTO yet.
In any case, this looks correct enough as it is!
Oh snap, alright, I'll find some time to fix it!