Current section
Files
Jump to
Current section
Files
README.md
# platform
Zero dependency platform detection library for gleam
[](https://hex.pm/packages/platform)
[](https://hexdocs.pm/platform/)
```sh
gleam add platform@1
```
```gleam
import gleam/io
import platform
pub fn main() {
io.debug(platform.runtime()) // Erlang, Node, Deno, Bun, Browser
io.debug(platform.arch()) // X86, X64, Arm, Arm64
io.debug(platform.os()) // Win32, Linux, Darwin, FreeBsd, OpenBsd
}
```
Further documentation can be found at <https://hexdocs.pm/platform>.