pontil/platform
Platform detection for Gleam, returning the runtime environment, operating
system, and CPU architecture for Erlang and JavaScript targets. Originally a
port of the core platform functionality from actions/toolkit
(extracted from the preview release of pontil). Runtime detection was
adapted from DitherWither/platform.
Usage
gleam add pontil_platform@1import pontil/platform
pub fn main() {
echo platform.details()
}
// Outputs one of:
//
// PlatformInfo("macOS", "26.3.1", Erlang, "28", Darwin, Arm64)
// PlatformInfo(
// name: "macOS",
// version: "26.3.1",
// runtime: Node,
// runtime_version: "24.15.0",
// os: Darwin,
// arch: Arm64)
// )
// PlatformInfo(
// name: "macOS",
// version: "26.3.1",
// runtime: Bun,
// runtime_version: "1.3.10",
// os: Darwin,
// arch: Arm64)
// )
// PlatformInfo(
// name: "macOS",
// version: "26.3.1",
// runtime: Deno,
// runtime_version: "2.7.10",
// os: Darwin,
// arch: Arm64)
// )Semantic Versioning
Pontil platform follows Semantic Versioning 2.0.