Skip to content

Latest commit

 

History

History
21 lines (17 loc) · 604 Bytes

README.md

File metadata and controls

21 lines (17 loc) · 604 Bytes

platform

Zero dependency platform detection library for gleam

Package Version Hex Docs

gleam add platform@1
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.