# Creating fully self-contained and pre-compiled library

**URL:** https://discourse.julialang.org/t/creating-fully-self-contained-and-pre-compiled-library/131374
**Category:** General Usage
**Created:** [August 5, 2025, 1:40pm UTC](https://discourse.julialang.org/t/creating-fully-self-contained-and-pre-compiled-library/131374 "2025-08-05T13:40:46Z")
**Posts on this page:** 1
**Showing post:** 14

<div class="post-metadata">

### Author: ![asprionj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/asprionj/32/6856_2.png) [@asprionj](https://discourse.julialang.org/u/asprionj)
#### Post date: [August 18, 2025, 9:25am UTC](https://discourse.julialang.org/t/creating-fully-self-contained-and-pre-compiled-library/131374/14 "2025-08-18T09:25:14Z")

</div>

Update:

**Julia not being able to call `juliac`-compiled library** : See the progress on the issue linked above:

> This is a known limitation currently, as each system image thinks it’s the only one that should be loaded. Soon we will have a workaround for this by allowing you to give a library its own private copy of the julia runtime.

**`juliac` vs. binding partitions** : I run into the same problems as reported here: [Segmentation fault in executable after compilation with juliac including --trim --experimental arguments - General Usage - Julia Programming Language](https://discourse.julialang.org/t/segmentation-fault-in-executable-after-compilation-with-juliac-including-trim-experimental-arguments/125303).

- As long as I have a simple example that does not rely on other packages (no `using` or `import` statements), I can use `--experimental --trim`.
- As soon as I rely on other packages (`JSON.jl` in my PoC), I cannot use `--trim` anymore. Errors similar to the ones reported in the referenced thread occur.
- This seems to be due to a regression between the two experimental features “_trimming during binary generation_” and “_binding partitions_”.
- I can compile and successfully run (on Windows and in a Docker container under `ubuntu:latest`) examples relying on other packages, just without `--trim` and thus a ~200 MB instead of 1.8 MB library. But for my PoC, that’s OK for the moment.

---

_[View the full topic](https://discourse.julialang.org/t/creating-fully-self-contained-and-pre-compiled-library/131374)._
