You can find @ratfactor 's explanation here, in particular the example using std.process.argsAlloc. std.process.argsAlloc works basically the same as std.process.args, expect that you have to pass in an allocator along with it and add an additional defer statement defer std.process.argsFree(allocator, args);
afterwords to clear the memory. argsAlloc() will work for both Windows and Linux, whereas args() only works for Linux.