# Using Rust inside a Crystal program

**URL:** <https://forum.crystal-lang.org/t/using-rust-inside-a-crystal-program/1970>\
**Category:** Help & Support\
**Created:** [April 18, 2020, 10:28am UTC](https://forum.crystal-lang.org/t/using-rust-inside-a-crystal-program/1970 "2020-04-18T10:28:17Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![straight-shoota](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/straight-shoota/32/36_2.png) [@straight-shoota](https://forum.crystal-lang.org/u/straight-shoota)\
**Post date:** [April 18, 2020, 12:44pm UTC](https://forum.crystal-lang.org/t/using-rust-inside-a-crystal-program/1970/3 "2020-04-18T12:44:52Z")

</div>

> [@oren](#):
>
> when there is a need to squeeze more performance, to use call a Rust code from the Crystal program

I’m confused. How do you expect to gain more performance from Rust? Rust and Crystal should be roughly on par performance wise. Both compile to a LLVM backend, so even the optimizations are pretty similar. There are some differences in the runtimes, but I’m not aware that makes a big difference. Many benchmarks show Rust and Crystal performing pretty similar. Even if one had a slight edge over the other, it would most likely not justify the overhead for switching to the other.

This could still be a fun endevour, I just don’t think this makes sense when you’re looking for performance improvement.

---

_[View the full topic](https://forum.crystal-lang.org/t/using-rust-inside-a-crystal-program/1970)._
