2025-07-25 –, Main Room 6
Julia is already equipped with enough tools to interact with C libraries, but you have to be C developer to operate all those unsafe_
prefixed functions correctly.
But what if your physical degree scientists have to make mathematical models crunching gigabytes of data coming directly from C and you don't have time budget to make a copy?
In this talk I will show how to build wrappers around your C API to provide native Julia look and feel for C types and functions
If I sparked your interest with "Adventures embedding Julia on a $$$ chip-making machine 🤑" talk then you may have a question "But how did they made Julia code to interact with C in a nice way?".
For ASML lithography machines it is important not only to deliver high-end computational algorithms but also fit them into tight timing constraints. Which means that we can't afford to copy data inside of Julia managed memory and have to work with C structures directly.
That is a big challenge, as Julia doesn't know about lifetime rules of other languages and in general able to work with foreign memory only via unsafe_
calls which require careful usage.
I this talk I will show how to build a system of types which will represent C memory in native Julia way, so C structures will appear as Julia structures, C arrays and vectors will appear and behave like native Julia ones and even how to build wrappers for tensors and sparse matrices.
I will also show and explain the mechanism which ensures strong memory safety for such operations, preventing any memory leaks or violations and minimizing overhead of safety checks.
Software Architect in ASML working on Julia algorithms in the near real time system.
GitHub