Is there an equivalent to glibc’s mkstemp(3) tucked away somewhere in Zig’s standard library? I searched in std.fs to no avail, but that might have been the wrong place to look.
If not mkstemp, is there an alternative for creating guaranteed-unique file names in Zig?
Looks like makeTempPath relies on std.crypto.random for uniqueness. That might work.
Generally speaking, I am looking for the most idiomatic approach for Zig in this use case, and I am also trying to learn about the content and deliberate limitations of std.
Usually that sort of thing can be accessed under std.c but it doesn’t look like they have incorporated that function into the standard library. They have only added what the compiler uses.
If you are linking libc, then you can declare the function to use it.