# Pushing the Limits of Small Binary Creation

**URL:** <https://discourse.julialang.org/t/pushing-the-limits-of-small-binary-creation/120989>\
**Category:** General Usage\
**Tags:** compilation, experimentation\
**Created:** [October 7, 2024, 6:50am UTC](https://discourse.julialang.org/t/pushing-the-limits-of-small-binary-creation/120989 "2024-10-07T06:50:07Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![TheCedarPrince](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/thecedarprince/32/17323_2.png) [@TheCedarPrince](https://discourse.julialang.org/u/TheCedarPrince)\
**Post date:** [October 7, 2024, 6:50am UTC](https://discourse.julialang.org/t/pushing-the-limits-of-small-binary-creation/120989/1 "2024-10-07T06:50:07Z")

</div>

Hi all, quick story:

It was at a hotel bar the other day that @asinghvi17 , @avik , @mortenpi , Professor Rebecca Killick, and I did an impromptu hackathon for about 5 hours to see what could be possible with the newly landed PR [add --trim option for generating smaller binaries by JeffBezanson · Pull Request #55047 · JuliaLang/julia · GitHub](https://github.com/JuliaLang/julia/pull/55047) about making small binaries in Julia 1.12. Here’s a write-up of some of our findings and experimentation:

**juliac Is Really Great!** The juliac compiler that is in development is such a great idea! I highly recommend checking out the blog post by @jbytecode here: [juliac](https://jbytecode.github.io/juliac/) on a starters guide for getting started with juliac usage! What we uniquely did here was contribute with showing how to make ccallable functions work within juliac.

**Language Interoperability Is Possible with Small Binaries.** After much tinkering and exploring, we figured out how to make a small binary that could be executed from within C++ (I’ll let Morten comment more on that!) which evaluated as expected. But what was quite exciting is that after a bunch more tinkering, we got the small binaries to be callable (and usable) from within Julia and R languages!

**The Future of juliac Is Exciting!** I would say right now, it is still a bit tricky to write juliac compatible code (i.e. type stability, how to use the Julia C/C++ interfaces, write the interface to these binaries from different languages) but there is a lot of richness here. I think we are now at a new frontier for a deeper level of language interoperability that will see Julia proliferate across other ecosystems. I’ll let others comment here!

* * *

If you want to reproduce my results and experiments, [I made a toy repo here for playing around further](https://github.com/TheCedarPrince/InteroperableJuliaBinaries)!

But, here are some teaser photos showing this in action in Julia:

 ![image](https://global.discourse-cdn.com/julialang/original/3X/0/6/062af457d2eca2da137794c42ef677f20ac4acf2.png)

And then in R:

 ![image](https://global.discourse-cdn.com/julialang/original/3X/6/8/683a6d4f1e563eb798fe113fe2ef44fb89dc2817.png)

There is so much to be done here! Alas, I am going to be busy for the next week or so so probably won’t be able to get back to this soon, but I wanted to write up my thoughts and findings here before I am sucked into other research and coursework endeavors again.

Cheers and please let me know your thoughts and ideas!

~ tcp 🌳

---

_[View the full topic](https://discourse.julialang.org/t/pushing-the-limits-of-small-binary-creation/120989)._
