Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add tinygo tool pipeline illustration #290

Open
soypat opened this issue Sep 15, 2022 · 3 comments
Open

add tinygo tool pipeline illustration #290

soypat opened this issue Sep 15, 2022 · 3 comments

Comments

@soypat
Copy link
Contributor

soypat commented Sep 15, 2022

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?
tinygoPipeline

@deadprogram
Copy link
Member

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...

@aykevl
Copy link
Member

aykevl commented Sep 15, 2022

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!

@soypat
Copy link
Contributor Author

soypat commented Sep 15, 2022

Oh snap, alright, I'll find some time to fix it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants