Help equivalence getenv("USER")

hello
linux name = getenv(“USER”)

zig ???

please.

1 Like

The Zig standard library implements getenv.

4 Likes

std.os.getenv only works on certain platforms. For cross-platform code, there’s std.process.getEnvVarOwned

5 Likes

hello :wink:
My entire process, my entire application is based on Linux, especially at the very low level.
Anyway, from Windows, you can call a Linux application with WSL and vice versa
thanks anyway
standard posix
ex :

 LDA.user = std.posix.getenv("USER") orelse "INITLDA";