# Why bootstrap?

**URL:** https://forum.crystal-lang.org/t/why-bootstrap/2583
**Category:** Help & Support
**Created:** [September 30, 2020, 2:48pm UTC](https://forum.crystal-lang.org/t/why-bootstrap/2583 "2020-09-30T14:48:52Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![FGasper](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/fgasper/32/954_2.png) [@FGasper](https://forum.crystal-lang.org/u/FGasper)
#### Post date: [September 30, 2020, 2:48pm UTC](https://forum.crystal-lang.org/t/why-bootstrap/2583/1 "2020-09-30T14:48:52Z")

</div>

Hello,

I’m sorry for what may sound like a weird question, but why is Crystal’s compiler written in Crystal rather than C/C++? It seems to complicate cross-compatibility; for example, there’s no Raspbian package, and my attempts to build Crystal with MacPorts have failed.

The language itself looks like a thing of beauty 🙂.

---

<div class="post-metadata">

### Author: ![bcardiff](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/bcardiff/32/3_2.png) [@bcardiff](https://forum.crystal-lang.org/u/bcardiff)
#### Post date: [September 30, 2020, 3:00pm UTC](https://forum.crystal-lang.org/t/why-bootstrap/2583/2 "2020-09-30T15:00:45Z")

</div>

> **[Good bye Ruby Thursday](https://crystal-lang.org/2013/11/14/good-bye-ruby-thursday.html)**
>
> If you don’t know it already, Crystal is a programming language with syntax and semantics similar to Ruby, except that it is not interpreted, it compiles programs to native code.

And we like to program more in Crystal than in C/C++ 😄  
It’s also a way to keep using the std-lib itself

---

<div class="post-metadata">

### Author: ![asterite](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/asterite/32/60_2.png) [@asterite](https://forum.crystal-lang.org/u/asterite)
#### Post date: [September 30, 2020, 3:02pm UTC](https://forum.crystal-lang.org/t/why-bootstrap/2583/3 "2020-09-30T15:02:20Z")

</div>

Another reason: we (or at least I) don’t know how to program in C/C++ at the scale of doing a compiler (the only knowledge I have about C++ is some classes in university, so from that you can guess my level 😁). We do know Ruby, and that’s what we used. And since Crystal is very similar to Ruby, we eventually ported it to Crystal.

---

<div class="post-metadata">

### Author: ![asterite](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/asterite/32/60_2.png) [@asterite](https://forum.crystal-lang.org/u/asterite)
#### Post date: [September 30, 2020, 3:08pm UTC](https://forum.crystal-lang.org/t/why-bootstrap/2583/4 "2020-09-30T15:08:14Z")

</div>

That said, one day we could make the compiler compile to C instead of LLVM. Then you could bootstrap it from C…

Now that I think about it… I wonder if there’s an LLVM IR -\> C translator somewhere already… 🤔

---

<div class="post-metadata">

### Author: ![FGasper](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/fgasper/32/954_2.png) [@FGasper](https://forum.crystal-lang.org/u/FGasper)
#### Post date: [September 30, 2020, 3:32pm UTC](https://forum.crystal-lang.org/t/why-bootstrap/2583/5 "2020-09-30T15:32:36Z")

</div>

Fair enough, all! Thank you for prompt responses.

Hoping to get to play with all this hotness soon. 🙂

---

<div class="post-metadata">

### Author: ![jhass](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/jhass/32/1779_2.png) [@jhass](https://forum.crystal-lang.org/u/jhass)
#### Post date: [October 1, 2020, 9:02am UTC](https://forum.crystal-lang.org/t/why-bootstrap/2583/6 "2020-10-01T09:02:24Z")

</div>

FWIW I don’t think that porting to a new platform is complicated by bootstrapping. The hard part here is mostly ABI compatibility and then stdlib compatiility to plaform specific behavior of libc & kernel APIs. As Ary hinted we could probably gain some things for free here by being a C transpiler rather than an LLVM frontend, but whether that frontend or transpiler is written in Crystal or C/C++ doesn’t really matter at all at this point :)
