platform! : => {
arch : [X86, X64, ARM, AARCH64, OTHER(Str)],
os : [LINUX, MACOS, WINDOWS, OTHER(Str)],
}
Report the architecture and operating system for which the host was built.
Env :: # (opaque)
Read and modify the process environment without losing native OS strings.
Variable names and values use OsStr because Unix environment data
is not required to be UTF-8. Use var_str! when an application
specifically requires text. Paths use basic-cli's byte-preserving Path type.
platform! : => {
arch : [X86, X64, ARM, AARCH64, OTHER(Str)],
os : [LINUX, MACOS, WINDOWS, OTHER(Str)],
}
Report the architecture and operating system for which the host was built.
Return all environment variables as native name/value pairs.
Native non-Unicode values are preserved. Iteration order is unspecified and may differ between calls or operating systems.
Reads the given environment variable.
Returns Err(VarNotFound(name)) if the variable is not set.
Reads the given environment variable as a string if its native value is valid text.
Reads the current working directory from the environment.
Returns Err(CwdUnavailable) if the cwd cannot be determined.
Change the process current working directory.
Returns Err(InvalidCwd(err)) when the path cannot be used as a working
directory. The process-wide change remains in effect until changed again.
Gets the path to the currently-running executable.
Returns Err(ExePathUnavailable) if the path cannot be determined.
Gets the default directory for temporary files.