# What are the differences between PackageCompiler and BinaryBuilder to build stan-alone apps?

**URL:** <https://discourse.julialang.org/t/what-are-the-differences-between-packagecompiler-and-binarybuilder-to-build-stan-alone-apps/100531>\
**Category:** General Usage\
**Tags:** question, binarybuilder, package-compiler, app\
**Created:** [June 18, 2023, 8:16pm UTC](https://discourse.julialang.org/t/what-are-the-differences-between-packagecompiler-and-binarybuilder-to-build-stan-alone-apps/100531 "2023-06-18T20:16:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bertulli](https://avatars.discourse-cdn.com/v4/letter/b/ecc23a/32.png) [@bertulli](https://discourse.julialang.org/u/bertulli)\
**Post date:** [June 18, 2023, 8:16pm UTC](https://discourse.julialang.org/t/what-are-the-differences-between-packagecompiler-and-binarybuilder-to-build-stan-alone-apps/100531/1 "2023-06-18T20:16:40Z")

</div>

Hi all!

Pretty much the title question, but I’d like to give a bit of context. I’m using Julia to develop my Master’s thesis (love the language so far). I need to integrate a linear model predictor I’m developing into the workflow of my lab colleagues, and I have now a choice. I can ask them to install Julia, but the ideal would be to produce a stand-alone binary executable. My question is: **what are the differences** between [PackageCompiler’s `create_app()`](https://docs.juliahub.com/PackageCompiler/MMV8C/2.1.7/apps.html) and [BinaryBuilder.jl](https://binarybuilder.org/)? If you prefer it in this way, why would I need one when there’s the other?  
I can make two observations:

1. For what I read, BinaryBuilder is more targeted towards cross-compilation, whereas PackageCompiler is not. Did I understood correctly? If yes, why on the language homepage it is advised PackageCompiler to compile to binary (at voice “Ecosystem”)?
2. Little note: I need to embed the model data into the application (for now simply using `Serialization.jl` and deserializing the object). Is this easier in one app or in the other?

Thanks!

---

<div class="post-metadata">

**Author:** ![giordano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/giordano/32/2166_2.png) [@giordano](https://discourse.julialang.org/u/giordano)\
**Post date:** [June 18, 2023, 8:38pm UTC](https://discourse.julialang.org/t/what-are-the-differences-between-packagecompiler-and-binarybuilder-to-build-stan-alone-apps/100531/2 "2023-06-18T20:38:44Z")

</div>

To put it simple, BinaryBuilder is for compiling non-Julia software, supported languages are C/C++, Fortran, Rust and Go. If you want to create an executable out of some Julia code, PackageCompiler is probably your best bet at the moment, BinaryBuilder can’t help you with that.

---

<div class="post-metadata">

**Author:** ![sylvaticus](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sylvaticus/32/203883_2.png) [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Post date:** [June 18, 2023, 10:04pm UTC](https://discourse.julialang.org/t/what-are-the-differences-between-packagecompiler-and-binarybuilder-to-build-stan-alone-apps/100531/3 "2023-06-18T22:04:47Z")

</div>

To add more context, BinaryBuilder is used to compile third-party libraries that are need by Julia packages.  
For example, when you install (add) Ipopt.jl, you (by default) install the C++ Ipopt library that has been compiled with BinaryBuilder and used (wrapped) by Ipopt.jl.

---

<div class="post-metadata">

**Author:** ![bertulli](https://avatars.discourse-cdn.com/v4/letter/b/ecc23a/32.png) [@bertulli](https://discourse.julialang.org/u/bertulli)\
**Post date:** [June 19, 2023, 9:12am UTC](https://discourse.julialang.org/t/what-are-the-differences-between-packagecompiler-and-binarybuilder-to-build-stan-alone-apps/100531/4 "2023-06-19T09:12:34Z")

</div>

Got it, thank you very much, to both! 🙏
