# What's the difference between crystal run xxx.cr and crystal xxx.cr?

**URL:** <https://forum.crystal-lang.org/t/whats-the-difference-between-crystal-run-xxx-cr-and-crystal-xxx-cr/6287>\
**Category:** Help & Support\
**Created:** [January 10, 2024, 5:16am UTC](https://forum.crystal-lang.org/t/whats-the-difference-between-crystal-run-xxx-cr-and-crystal-xxx-cr/6287 "2024-01-10T05:16:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![femto](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/femto/32/2246_2.png) [@femto](https://forum.crystal-lang.org/u/femto)\
**Post date:** [January 10, 2024, 5:16am UTC](https://forum.crystal-lang.org/t/whats-the-difference-between-crystal-run-xxx-cr-and-crystal-xxx-cr/6287/1 "2024-01-10T05:16:42Z")

</div>

What’s the difference between crystal run xxx.cr and crystal xxx.cr?  
they seemed the same, so why two different syntax?  
probably because crystal run xxx.cr can pass some additional flags  
to compiler?

---

<div class="post-metadata">

**Author:** ![zw963](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/zw963/32/1623_2.png) [@zw963](https://forum.crystal-lang.org/u/zw963)\
**Post date:** [January 10, 2024, 5:32am UTC](https://forum.crystal-lang.org/t/whats-the-difference-between-crystal-run-xxx-cr-and-crystal-xxx-cr/6287/2 "2024-01-10T05:32:53Z")

</div>

`crystal xxx.cr` just for conveniently, it same as run when pass a file as arg

---

<div class="post-metadata">

**Author:** ![jgaskins](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/jgaskins/32/2449_2.png) [@jgaskins](https://forum.crystal-lang.org/u/jgaskins)\
**Post date:** [January 10, 2024, 6:35am UTC](https://forum.crystal-lang.org/t/whats-the-difference-between-crystal-run-xxx-cr-and-crystal-xxx-cr/6287/3 "2024-01-10T06:35:45Z")

</div>

As @zw963 mentioned, it’s a shorthand. If you want to pass compiler flags, though, you need to use `run`.
