platform

package
v1.235.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 26, 2026 License: Apache-2.0 Imports: 12 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package platform defines native plugin build targets and compatible selections.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Current

func Current() string

Current uses the running Atmos binary's minimum ISA, never mutable environment variables or a different architecture supported through OS emulation.

func Select

func Select[T any](available map[string]T, requested string) (string, error)

Select chooses the best compatible declared payload, never crossing OS or architecture. Equivalent declarations prefer the exact spelling, then lexical order for determinism.

Types

type Target

type Target struct {
	OS           string
	Architecture string
	Variant      string
}

Target is a canonical OS/architecture pair with an optional Go-supported ISA variant.

func Parse

func Parse(value string) (Target, error)

Parse validates explicit targets without architecture aliases or implicit host defaults.

func (Target) Environment

func (t Target) Environment(inherited []string) []string

Environment pins the compiler target and portable ABI instead of inheriting host tuning. Authors needing CGO must build externally with a target toolchain.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL