platform

package
v1.234.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

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