# 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:** 15

<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 19, 2025, 6:35am UTC](https://discourse.julialang.org/t/creating-fully-self-contained-and-pre-compiled-library/131374/15 "2025-08-19T06:35:42Z")

</div>

Another update, this time about Artifacts. I think to remember I read something about `juliac` and Artifacts, and that `PackageCompiler` has functionality to collect all required Artifacts – but don’t remember where. Any pointers are welcome, thanks!

Artifacts are the binary dependencies (compiled shared libraries, mostly) some packages rely on. These are automatically downloaded to a dedicated folder (something like `<user-folder>.julia/artifacts`), and the julia runtime knows where to look for them.

Now, there’s not much documentation on this; [Artifacts · The Julia Language](https://docs.julialang.org/en/v1/stdlib/Artifacts/) is quite minimalistic and the referenced section about `Pkg` is intended for package devs. There is some more explanation in [Custom binaries · JuMP](https://jump.dev/JuMP.jl/stable/developers/custom_solver_binaries/).

When I use a package which requires artifacts (my example is [jump-dev/HiGHS.jl](https://github.com/jump-dev/HiGHS.jl)) and use `juliac` to generate a binary, upon execution I get the error:

```julia-auto
ErrorException("`ccall` requires the compiler")

```

Now:

- What is meant by the “compiler”? Initially I thought `libLLVM*` (which I remove due to its size) or a C compiler such as `gcc` (which I do have available). → **But it seems to be `libjulia-codegen*` AND `libLLVM*`.** Together, they are 218MB and, what concerns me more, make up all the dynamic “interpreted”/JIT-compiled machinery of julia, which I exactly do NOT want in a fully pre-compiled binary.
- Why is it needed for a `ccall`?
- How do I identify all required artifacts, and where do I put them (under Windows and Linux), absolute and relative to my `juliac`-generated binary?
  - I can run the “MWE” in `juliac`-compiled form, when staying on the build machine with the auto-downloaded artifacts stil in place.
  - Would just be good to know which artifacts are actually downloaded and used, where they are, and if I could package them into a portable “distribution” somehow.

---

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