# Julia 1.12 new --trim feature for MCU compiler

**URL:** <https://discourse.julialang.org/t/julia-1-12-new-trim-feature-for-mcu-compiler/133050>\
**Category:** General Usage\
**Created:** [October 10, 2025, 3:40pm UTC](https://discourse.julialang.org/t/julia-1-12-new-trim-feature-for-mcu-compiler/133050 "2025-10-10T15:40:55Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![yvikhlya](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yvikhlya/32/3753_2.png) [@yvikhlya](https://discourse.julialang.org/u/yvikhlya)\
**Post date:** [October 10, 2025, 3:40pm UTC](https://discourse.julialang.org/t/julia-1-12-new-trim-feature-for-mcu-compiler/133050/1 "2025-10-10T15:40:55Z")

</div>

```julia-auto
./build/bin/app_test_exe
Hello World!

ls -lh build/bin/app_test_exe
-rwxr-xr-x@ 1 gabrielbaraldi staff 1.1M Oct 6 17:22 ./build/bin/app_test_exe*

```

So, when Julia for MCUs? Comon, we have to show to all those micropython bigots!

---

<div class="post-metadata">

**Author:** ![klafyvel](https://avatars.discourse-cdn.com/v4/letter/k/a587f6/32.png) [@klafyvel](https://discourse.julialang.org/u/klafyvel)\
**Post date:** [October 10, 2025, 3:47pm UTC](https://discourse.julialang.org/t/julia-1-12-new-trim-feature-for-mcu-compiler/133050/2 "2025-10-10T15:47:09Z")

</div>

You might want to play with [GitHub - Seelengrab/MCUCompiler.jl](https://github.com/Seelengrab/MCUCompiler.jl) 🙂

---

<div class="post-metadata">

**Author:** ![LeePhillips](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/leephillips/32/205514_2.png) [@LeePhillips](https://discourse.julialang.org/u/LeePhillips)\
**Post date:** [October 10, 2025, 4:58pm UTC](https://discourse.julialang.org/t/julia-1-12-new-trim-feature-for-mcu-compiler/133050/3 "2025-10-10T16:58:41Z")

</div>

People saying that “hello world” compiled by juliac is 1.1M (I get 1.6M on my machine) is a bit misleading, as is the description of these binaries as distributable. The binary doesn’t run unless it sits alongside (in my case) 130M of other files (which juliac puts in lib and share). So really “hello world” here is 132M.

“Hello world” in Fortran, compiled by gfortran, gets me a 16k binary, and I can run it on any Linux machine.

---

<div class="post-metadata">

**Author:** ![Sukera](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@Sukera](https://discourse.julialang.org/u/Sukera)\
**Post date:** [October 10, 2025, 5:01pm UTC](https://discourse.julialang.org/t/julia-1-12-new-trim-feature-for-mcu-compiler/133050/4 "2025-10-10T17:01:22Z")

</div>

> [@klafyvel](#):
>
> You might want to play with [GitHub - Seelengrab/MCUCompiler.jl](https://github.com/Seelengrab/MCUCompiler.jl) 🙂

I should mention that this repo is waaaayy before ` --trim` , and definitely completely incompatible 🙂 They’re very different approaches

---

<div class="post-metadata">

**Author:** ![yvikhlya](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yvikhlya/32/3753_2.png) [@yvikhlya](https://discourse.julialang.org/u/yvikhlya)\
**Post date:** [October 10, 2025, 5:03pm UTC](https://discourse.julialang.org/t/julia-1-12-new-trim-feature-for-mcu-compiler/133050/5 "2025-10-10T17:03:39Z")

</div>

> [@LeePhillips](#):
>
> “Hello world” in Fortran, compiled by gfortran, gets me a 16k binary, and I can run it on any Linux machine.

It still needs libc.so which is ~300K. It is just present on any linux machine.

---

<div class="post-metadata">

**Author:** ![gbaraldi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gbaraldi/32/22101_2.png) [@gbaraldi](https://discourse.julialang.org/u/gbaraldi)\
**Post date:** [October 10, 2025, 6:54pm UTC](https://discourse.julialang.org/t/julia-1-12-new-trim-feature-for-mcu-compiler/133050/6 "2025-10-10T18:54:39Z")

</div>

Baby steps. The big ones are that julia depends on several libraries and tries to load them by default. We want to change that but it’s not there yet. (The biggest culprits are BLAS and friends)

---

<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:** [October 10, 2025, 8:29pm UTC](https://discourse.julialang.org/t/julia-1-12-new-trim-feature-for-mcu-compiler/133050/7 "2025-10-10T20:29:28Z")

</div>

> [@gbaraldi](#):
>
> (The biggest culprits are BLAS and friends)

I’m pretty sure openblas isn’t loaded at Julia startup in v1.13, but only when you call a function in it for the first time. That’s at least what I noticed when starting Julia with `OPENBLAS_VERBOSE=2`

---

<div class="post-metadata">

**Author:** ![StevenSiew](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevensiew/32/218393_2.png) [@StevenSiew](https://discourse.julialang.org/u/StevenSiew)\
**Post date:** [October 10, 2025, 9:50pm UTC](https://discourse.julialang.org/t/julia-1-12-new-trim-feature-for-mcu-compiler/133050/8 "2025-10-10T21:50:26Z")

</div>

Just getting Julia to compile (in an official release) is a BIG STEP. Not baby steps. Sure it is 130 MEGABYTES but try old versions of Julia where you CANNOT compile the source code to binary at all. Huge step in the right direction.
