Can binaries made with juliac --trim open files or read input?

That’s my question. Does anyone have a working example of a program that compiles under v1.12 using juliac --trim=safe etc. that either opens and reads from a file or reads input from the terminal?

1 Like

Next point on the TODO list:

From the presentation on JuliaCon, July 2025.

4 Likes

You can try with StaticTools.jl, although it will have caveats, if it works at all. But you can check. :slight_smile:

1 Like

This old demo does some low level reading and writing

3 Likes

I played around with wrapping liburing so that I can use io_uring to asynchronously read and write in trimmable Julia. I managed to write my own basic cp, but the API is still not ready for public consumption yet as I’m still trying to figure out how to use sum types to safely wrap C APIs without using exception

2 Likes