Julia Binary Artifacts for Dummies
Understanding how Julia Packages are able to only pick binaries for your particular architecture.
This is a followup to my Julia Artifacts for Dummies, which only dealt with non-architecture specific resources.
This story is to help understand how Julia’s JLL packages work. Julia packages that wrap a library written in C/C++ depend on these.
SDL Example
One example of this would be the Simple Direct Media Layer (SDL) which is often for simple 2D pixel games as it abstracts away how you write pixels into a pixel buffer on different platforms. The Julia package is called SimpleDirectMediaLayer.jl. You would install it with:
(@v1.5) pkg> add SimpleDirectMediaLayer
But what we are interested in here is looking at how it wraps the binaries made in C/C++ code. If you take a peek inside its Project.toml file on Github you will find:
name = "SimpleDirectMediaLayer"
uuid = "98e33af6-2ee5-5afd-9e75-cbc738b767c4"
repo = "https://github.com/jonathanBieler/SimpleDirectMediaLayer.jl.git"
version = "0.2.1"
[deps]
ColorTypes = "3da002f7-5984-5a60-b8a6-cbb66c0b333f"
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
SDL2_image_jll = "41f3cfe1-fd11-58ad-8074-b9730c29438b"
SDL2_jll =…