; Backus-Naur Form Grammar for the Build Variants extension ; https://semver.xyz/extensions/variants/ ; ; A Build Variant is ordinary metadata (see VERSION.bnf) whose ; identifiers name deployment-target axes, ordered coarse-to-fine so that the ; core Build Channels rule (a "+ " on a comparator/tilde/caret) selects ; a coherent subset by prefix: ; ^1.0.0+linux -> every linux variant in the 1.x line ; ^1.0.0+linux.x64 -> narrows to linux/x64 (any abi) ; 1.2.0+win32.x64 -> one exact artifact ; The fixed axes MUST appear in order (os, then arch, then abi); any fixed axis ; may be omitted only if every later fixed axis is also omitted, so a variant is ; always a PREFIX of the axis sequence. An omitted axis is no constraint. ; "wasm32" stands alone as the whole platform: a WebAssembly build is not tied ; to an operating system. ; ; Qualifiers follow the fixed axes. A floor ("glibc.2.28", "musl.1.2", ; "osv.11.0", "napi.8") means "this value or later"; an exact tag ("node.127", ; "electron.123") must match the target exactly; any other identifier is a ; feature tag ("avx2", "cuda"). Floors are plain numeric identifiers, so they ; compare numerically under the core precedence rules. ; ; Target matching (which variant suits a machine) is defined in the extension: ; a variant applies when every coordinate it states is satisfied by the target, ; and the most specific applicable variant of the highest applicable release ; wins. ::= ( "." )* ::= ( "." ( "." )? )? | "wasm32" ::= "linux" | "darwin" | "win32" | "freebsd" | "openbsd" | "android" | "sunos" | "aix" ::= "x64" | "arm64" | "arm" | "ia32" | "ppc64" | "s390x" | "riscv64" | "loong64" ; "arm" is ARMv7, what process.arch reports for ARMv6 and ARMv7 alike. ::= "glibc" ? | "musl" ? | "msvc" ::= | | ::= ( "osv" | "napi" ) ::= "." ( "." )? ::= ( "node" | "electron" ) "." ; A feature tag is any build identifier (see VERSION.bnf). Lowercase is ; conventional; tags SHOULD be sorted for a canonical form. ::=