# Get Crystal compiler version from executable

**URL:** https://forum.crystal-lang.org/t/get-crystal-compiler-version-from-executable/3865
**Category:** Help & Support
**Created:** [September 19, 2021, 8:41pm UTC](https://forum.crystal-lang.org/t/get-crystal-compiler-version-from-executable/3865 "2021-09-19T20:41:40Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![hutou](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/hutou/32/1337_2.png) [@hutou](https://forum.crystal-lang.org/u/hutou)
#### Post date: [September 19, 2021, 8:41pm UTC](https://forum.crystal-lang.org/t/get-crystal-compiler-version-from-executable/3865/1 "2021-09-19T20:41:40Z")

</div>

Hi,  
Are the Crystal compiler and/or the LLVM versions, such as given by the `crystal -v` command, stored in some manner in the executable ?  
Thanks

---

<div class="post-metadata">

### Author: ![Blacksmoke16](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/blacksmoke16/32/1241_2.png) [@Blacksmoke16](https://forum.crystal-lang.org/u/Blacksmoke16)
#### Post date: [September 19, 2021, 9:15pm UTC](https://forum.crystal-lang.org/t/get-crystal-compiler-version-from-executable/3865/2 "2021-09-19T21:15:22Z")

</div>

See [Crystal - Crystal 1.1.1](https://crystal-lang.org/api/Crystal.html#constant-summary).

---

<div class="post-metadata">

### Author: ![hutou](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/hutou/32/1337_2.png) [@hutou](https://forum.crystal-lang.org/u/hutou)
#### Post date: [September 19, 2021, 9:29pm UTC](https://forum.crystal-lang.org/t/get-crystal-compiler-version-from-executable/3865/3 "2021-09-19T21:29:36Z")

</div>

OK, thanks.  
(But as far as I could check, these constants are not integrated by default in the compiled code).

---

<div class="post-metadata">

### Author: ![Blacksmoke16](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/blacksmoke16/32/1241_2.png) [@Blacksmoke16](https://forum.crystal-lang.org/u/Blacksmoke16)
#### Post date: [September 19, 2021, 9:44pm UTC](https://forum.crystal-lang.org/t/get-crystal-compiler-version-from-executable/3865/4 "2021-09-19T21:44:23Z")

</div>

They represent the versions used to compile the Crystal binary that is being used. What are you wanting to do?

---

<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 19, 2021, 9:46pm UTC](https://forum.crystal-lang.org/t/get-crystal-compiler-version-from-executable/3865/5 "2021-09-19T21:46:25Z")

</div>

You can do the following to embed the Crystal version in the output program. The information is not embedded by default.

```crystal
COMPILED_WITH = {{ Crystal::VERSION }}
puts COMPILED_WITH

```

The same can be used usually to embed version information of other dependencies.
