Generating JuliaC libraries on Windows

Hi all,
I have been trying to use the new JuliaC capabilities in 1.12 (currently on 1.12.5). I have been able to compile executable binaries with some success, however I haven’t been able to successfully compile C callable code into usable libraries. Since the documentation doesn’t provide a thorough example or tutorial, I’ve tried following Jeff Bezanson’s example code shown in this presentation from a few months ago. However… this simply fails without throwing an error and as far as I can tell, nothing is produced. As an example, when I input into the windows terminal:

julia path\to\JuliaCPackage\JuliaC.jl TinyLibm --output-lib tinylibm --compile--ccallable --trim

As I mentioned before when I run this command, nothing happens. I’m not sure if I’m pointing to the JuliaC scripts incorrectly or if it’s saving the output somewhere unknown to me, but the command simply returns to the prompt with no messages.

The other thing I’ve tried out is pointing to the non package juliac folder in the actual Julia installation:

julia Julia-1.12.5\share\julia\Juliac.jl TinyLibm --output-lib tinylibm --compile--ccallable --trim

This sort of works, but I get an error saying I need to be in experimental mode. After fiddling around a bit, I can get this to produce something.

julia Julia-1.12.5\share\julia\Juliac.jl src\TinyLibm.jl --output-lib tinylibm --compile--ccallable --experimental --trim

I do indeed produce a a single tinylib.dll in the directory where I ran the compilation. However, when I try to follow Jeff’s example and use the bundle command to generate a julia callable library, it simply fails. I end up with this error:

Unexpected argument `--bundle`

So that’s pretty much where I’m at. I feel like I’m completely missing something on how to run this properly on Windows. Does anybody have any similarly simply libraries that work on Windows with a bit more detailed instructions?

Your best shot is probably WSL. Even if you get it to work, all the people that can provide support will also be on linux.