# Where can I learn about rackets compilation system in detail?

**URL:** https://racket.discourse.group/t/where-can-i-learn-about-rackets-compilation-system-in-detail/2573
**Category:** Internals
**Created:** [December 5, 2023, 6:01am UTC](https://racket.discourse.group/t/where-can-i-learn-about-rackets-compilation-system-in-detail/2573 "2023-12-05T06:01:06Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Jobhdez](https://avatars.discourse-cdn.com/v4/letter/j/b19c9b/32.png) [@Jobhdez](https://racket.discourse.group/u/Jobhdez)
#### Post date: [December 5, 2023, 6:01am UTC](https://racket.discourse.group/t/where-can-i-learn-about-rackets-compilation-system-in-detail/2573/1 "2023-12-05T06:01:06Z")

</div>

Hello you all.

I would like to study rackets compilation system; by this I mean I want to learn about its intermediate language, the optimizer, and the backend (eg x86-64 and aarch64) backends.

Ive been looking online but cant find anything. can someone point me to a paper about how the racket' s compiler works? thanks

---

<div class="post-metadata">

### Author: ![EmEf](https://avatars.discourse-cdn.com/v4/letter/e/53a042/32.png) [@EmEf](https://racket.discourse.group/u/EmEf)
#### Post date: [December 5, 2023, 1:19pm UTC](https://racket.discourse.group/t/where-can-i-learn-about-rackets-compilation-system-in-detail/2573/2 "2023-12-05T13:19:52Z")

</div>

There isnt much written up. Look through Matthew Flatt’s papers, esp. the one on using Chez as a backend. The compiler is a combination of the expander and the to-Chez layer. — People seem to read the code and begin to contribute.

---

<div class="post-metadata">

### Author: ![samth](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/samth/32/3_2.png) [@samth](https://racket.discourse.group/u/samth)
#### Post date: [December 5, 2023, 6:23pm UTC](https://racket.discourse.group/t/where-can-i-learn-about-rackets-compilation-system-in-detail/2573/3 "2023-12-05T18:23:38Z")

</div>

The best paper about the current system is this one: [Rebuilding Racket on Chez Scheme (Experience Report) ICFP'19](https://users.cs.utah.edu/plt/rkt-on-chez/)

That doesn't talk that much about how Chez Scheme itself works. For that, you can read more from various papers such as this one about continuation marks ([https://www-old.cs.utah.edu/plt/publications/pldi20-fd.pdf](https://www-old.cs.utah.edu/plt/publications/pldi20-fd.pdf)), this history of Chez Scheme ([https://legacy.cs.indiana.edu/~dyb/pubs/hocs.pdf](https://legacy.cs.indiana.edu/~dyb/pubs/hocs.pdf)) and Dybvig's dissertation ([https://legacy.cs.indiana.edu/~dyb/pubs/3imp.pdf](https://legacy.cs.indiana.edu/~dyb/pubs/3imp.pdf)). The History of Chez Scheme paper also cites a number of other papers.

---

<div class="post-metadata">

### Author: ![jryans](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/jryans/32/31_2.png) [@jryans](https://racket.discourse.group/u/jryans)
#### Post date: [December 6, 2023, 5:01pm UTC](https://racket.discourse.group/t/where-can-i-learn-about-rackets-compilation-system-in-detail/2573/4 "2023-12-06T17:01:28Z")

</div>

In terms of code, the [`linklet.sls`](https://github.com/racket/racket/blob/master/racket/src/cs/linklet.sls) file in Racket manages the primary boundary between Racket and Chez, which may be of interest when exploring compilation.

To learn more about Chez itself, along with the resources others have mentioned, you may also find the notes in [`IMPLEMENTATION.md`](https://github.com/cisco/ChezScheme/blob/main/IMPLEMENTATION.md) helpful.

---

<div class="post-metadata">

### Author: ![Jobhdez](https://avatars.discourse-cdn.com/v4/letter/j/b19c9b/32.png) [@Jobhdez](https://racket.discourse.group/u/Jobhdez)
#### Post date: [December 11, 2023, 11:54pm UTC](https://racket.discourse.group/t/where-can-i-learn-about-rackets-compilation-system-in-detail/2573/5 "2023-12-11T23:54:35Z")

</div>

so is contributing the chez scheme's compiler backend is indeed contributing to racket? or how can I contribute to the racket's compiler backend?

---

<div class="post-metadata">

### Author: ![jbclements](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/jbclements/32/11_2.png) [@jbclements](https://racket.discourse.group/u/jbclements)
#### Post date: [December 12, 2023, 12:25am UTC](https://racket.discourse.group/t/where-can-i-learn-about-rackets-compilation-system-in-detail/2573/6 "2023-12-12T00:25:03Z")

</div>

Yes, Racket's compiler uses Chez Scheme. Contributions to the Chez Scheme compiler will also affect the performance of Racket. Take a look at

> <https://github.com/racket/ChezScheme/blob/master/README.md>

and

> **[Commits · cisco/ChezScheme](https://github.com/cisco/ChezScheme/commits/main)**
>
> Chez Scheme . Contribute to cisco/ChezScheme development by creating an account on GitHub.

---

<div class="post-metadata">

### Author: ![Jobhdez](https://avatars.discourse-cdn.com/v4/letter/j/b19c9b/32.png) [@Jobhdez](https://racket.discourse.group/u/Jobhdez)
#### Post date: [December 12, 2023, 1:57am UTC](https://racket.discourse.group/t/where-can-i-learn-about-rackets-compilation-system-in-detail/2573/7 "2023-12-12T01:57:00Z")

</div>

thanks professor; could i work on the chez backend from the racket repo?

---

<div class="post-metadata">

### Author: ![samth](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/samth/32/3_2.png) [@samth](https://racket.discourse.group/u/samth)
#### Post date: [December 12, 2023, 3:09am UTC](https://racket.discourse.group/t/where-can-i-learn-about-rackets-compilation-system-in-detail/2573/8 "2023-12-12T03:09:30Z")

</div>

The Racket repository includes a copy of the Chez Scheme source code, so you can edit that and rebuild. In general we want to upstream changes to Chez and keep them in sync, but that can be worked out after you have a change you want to make.
