Summary
In this chapter, we went through the architecture of Truffle and saw how it provides a well-designed framework for other languages (guest languages) to run on GraalVM. We also looked at how Truffle interpreters are implemented and how they can optimize the AST before submitting the stabilized AST to the Graal for further optimization.
In this chapter, you have gained a good understanding of Truffle architecture and how Truffle provides a framework and an implementation layer on top of Graal. You have also explored the optimizations Truffle performs before submitting the code to Graal JIT for further optimization and execution.
In the next chapter, we will look at how JavaScript and LLVM languages (C, C++, and so on) implement Truffle and run on GraalVM.