Closed lukewilliamboswell closed 4 months ago
This will be helpful for build scripts which can use this instead of shelling out to another program like uname.
uname
# Env.roc ARCH : [X86, X64, ARM, AARCH64, OTHER Str] OS : [LINUX, MACOS, WINDOWS, OTHER Str] platform : Task {arch : ARCH, os: OS} *
app [main] { pf: platform "../platform/main.roc" } import pf.Stdout import pf.Task exposing [Task] import pf.Env main = platform = Env.platform! Stdout.line! "Running on $(Inspect.toStr platform)"
$ roc examples/test.roc Running on {arch: AARCH64, os: MACOS}
Closes #203
This will be helpful for build scripts which can use this instead of shelling out to another program like
uname
.Closes #203