# 使用 Homebrew, apk, dnf, MacPorts, Nix, pacman, apt, scoop, zypper 安装 glslang

查看 glslang 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:glslang
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install glslang
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install glslang
```

  证据: MacPorts ports tree: graphics/glslang/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add glslang
```

  证据: Alpine Linux edge package indexes: glslang from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz

- dnf (92%):

```sh
sudo dnf install glslang
```

  证据: Fedora Rawhide package metadata: glslang from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#glslang
```

  证据: nixpkgs package indexes: pkgs/by-name/gl/glslang/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- pacman (92%):

```sh
sudo pacman -S glslang
```

  证据: Arch Linux sync databases: glslang from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- Debian apt (92%):

```sh
sudo apt install glslang-dev
```

  证据: Debian stable package indexes: glslang-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- zypper (92%):

```sh
sudo zypper install glslang-devel
```

  证据: openSUSE Tumbleweed package metadata: glslang-devel from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst

### Windows

- Scoop (92%):

```sh
scoop install main/glslang
```

  证据: Scoop official bucket manifest trees: bucket/glslang.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

## 软件包事实

- **软件包键:** brew:glslang
- **软件包管理器:** Homebrew
- **版本:** 16.4.0
- **来源摘要:** OpenGL and OpenGL ES reference compiler for shading languages
- **主页:** <https://www.khronos.org/opengles/sdk/Reference-Compiler/>
- **仓库:** <https://github.com/KhronosGroup/glslang>
- **最后更新:** 2026-07-14T22:39:44Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- glslang (别名)
- glslangValidator (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 16.4.0
## 项目历史与用法

glslang is Khronos Group's reference front end for GLSL and ESSL, with a SPIR-V back end and a standalone command-line wrapper. In package-manager form it is best known through the `glslangValidator` and `glslang` executables used by graphics developers, engine build systems, and shader toolchains.

### 项目历史

The project descends from the OpenGL and OpenGL ES reference compiler work maintained by Khronos. Its public KhronosGroup GitHub repository was created in 2015, the same period in which SPIR-V and Vulkan-era shader tooling moved into more open, packageable workflows. The README describes the GLSL and ESSL front end as a reference validator whose results carry similar weight to the specifications, and it describes the AST-to-SPIR-V back end as virtually complete.

glslang grew beyond a GLSL syntax checker into a central shader translation and validation component. It added a partial HLSL front end, a reflection API, CMake and GN build support, and release automation that publishes binaries from tested tree states. The project documentation also records migration of `spirv-remap` functionality into SPIRV-Tools as `spirv-opt` functionality, illustrating how Khronos shader tooling was split into focused companion projects.

### 采用历史

Adoption followed the rise of Vulkan and SPIR-V: graphics projects needed a standard way to turn human-written shader languages into SPIR-V modules and to validate shaders against Khronos rules. The repository's long-lived presence under the KhronosGroup organization, several thousand stars, and packaging across Homebrew, Debian, Fedora, Arch, Nix, MacPorts, Scoop, and other distributions reflect its role as shared infrastructure rather than a single-application utility.

For package maintainers, glslang became a dependency-sized building block for Vulkan SDKs, rendering engines, CI checks, and shader asset pipelines. Its value is partly cultural: installing it gives a reproducible command-line validator that tracks Khronos reference behavior more closely than ad hoc compiler front ends.

### 使用方式

Practitioners use glslang by passing shader files to the standalone wrapper. File extensions such as `.vert`, `.frag`, `.comp`, and ray-tracing-stage extensions select stage-specific rules, and the tool prints diagnostics, AST information, or SPIR-V output depending on options. Developers also build it from source through CMake or GN when integrating it into larger graphics SDKs or engine build systems.

Typical use cases include validating shaders before they enter a game or visualization build, compiling GLSL or ESSL to SPIR-V for Vulkan pipelines, checking generated shader code in CI, and inspecting reflection information for engine resource binding code.

### 为什么软件包爱好者会关心

glslang matters to package users because it is small enough to install as a command-line tool but authoritative enough to sit in serious graphics build graphs. It also demonstrates the Khronos ecosystem pattern: glslang handles language front-end and SPIR-V generation work, while adjacent packages such as SPIRV-Tools handle optimization and lower-level binary manipulation.

### 时间线

- 2015: KhronosGroup created the public GitHub repository.
- 2015: Vulkan and SPIR-V-era workflows made reference shader-to-SPIR-V tooling broadly package-relevant.
- 2026: The README announced deprecation of the HLSL front end with migration guidance.

### Related projects

- SPIRV-Tools provides SPIR-V optimization, validation, and binary tooling used beside glslang.
- Vulkan SDK distributions and rendering engines commonly pair glslang with shader compilation and asset-pipeline tooling.
- Khronos specifications for OpenGL, OpenGL ES, Vulkan, and SPIR-V define the standards context that gives glslang its reference-tool role.

### 来源

- <https://api.github.com/repos/KhronosGroup/glslang>
- <https://github.com/KhronosGroup/glslang>
- <https://raw.githubusercontent.com/KhronosGroup/glslang/main/README.md>
- <https://www.khronos.org/opengles/sdk/tools/Reference-Compiler/>


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals

## 其他软件包管理器记录

- Debian apt - glslang-dev - 15.1.0+1.4.309.0-1: normalized package name match | Debian stable package indexes: glslang-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | OpenGL and OpenGL ES shader front end and validator -- development files | https://github.com/KhronosGroup/glslang
- Debian apt - glslang-tools - 15.1.0+1.4.309.0-1: normalized package name match | Debian stable package indexes: glslang-tools from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | OpenGL and OpenGL ES shader front end and validator -- tools | https://github.com/KhronosGroup/glslang
- Nix - glslang: normalized package name match | nixpkgs package indexes: pkgs/by-name/gl/glslang/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - glslang-dev - 14.0.0-2: normalized package name match | Ubuntu 24.04 LTS package indexes: glslang-dev from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | OpenGL and OpenGL ES shader front end and validator -- development files | https://github.com/KhronosGroup/glslang
- Ubuntu apt - glslang-tools - 14.0.0-2: normalized package name match | Ubuntu 24.04 LTS package indexes: glslang-tools from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | OpenGL and OpenGL ES shader front end and validator -- tools | https://github.com/KhronosGroup/glslang
- apk - glslang - 1.4.341.0-r0: normalized package name match | Alpine Linux edge package indexes: glslang from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Khronos reference front-end for GLSL, ESSL, and sample SPIR-V generator | https://github.com/KhronosGroup/glslang
- apk - glslang-dev - 1.4.341.0-r0: normalized package name match | Alpine Linux edge package indexes: glslang-dev from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Khronos reference front-end for GLSL, ESSL, and sample SPIR-V generator (development files) | https://github.com/KhronosGroup/glslang
- apk - glslang-libs - 1.4.341.0-r0: normalized package name match | Alpine Linux edge package indexes: glslang-libs from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Khronos reference front-end for GLSL, ESSL, and sample SPIR-V generator (libraries) | https://github.com/KhronosGroup/glslang
- apk - glslang-static - 1.4.341.0-r0: normalized package name match | Alpine Linux edge package indexes: glslang-static from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Khronos reference front-end for GLSL, ESSL, and sample SPIR-V generator (static library) | https://github.com/KhronosGroup/glslang
- dnf - glslang - 16.3.0-2.fc45: normalized package name match | Fedora Rawhide package metadata: glslang from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | OpenGL and OpenGL ES shader front end and validator | https://github.com/KhronosGroup/glslang
- dnf - glslang-devel - 16.3.0-2.fc45: normalized package name match | Fedora Rawhide package metadata: glslang-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Development files for glslang | https://github.com/KhronosGroup/glslang
- pacman - glslang - 1:1.4.357.0-1: normalized package name match | Arch Linux sync databases: glslang from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | OpenGL and OpenGL ES shader front end and validator | https://github.com/KhronosGroup/glslang
- zypper - glslang-devel - 16.4.0-1.3: normalized package name match | openSUSE Tumbleweed package metadata: glslang-devel from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | OpenGL and OpenGL ES shader front end and validator | https://www.khronos.org/opengles/sdk/tools/Reference-Compiler/
- zypper - glslang-nonstd-devel - 16.4.0-1.3: normalized package name match | openSUSE Tumbleweed package metadata: glslang-nonstd-devel from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Secondary set of header files for glslang | https://www.khronos.org/opengles/sdk/tools/Reference-Compiler/
- zypper - libglslang16 - 16.4.0-1.3: normalized package name match | openSUSE Tumbleweed package metadata: libglslang16 from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | OpenGL and OpenGL ES shader front end implementation | https://www.khronos.org/opengles/sdk/tools/Reference-Compiler/
- zypper - libglslang16-32bit - 16.4.0-1.3: normalized package name match | openSUSE Tumbleweed package metadata: libglslang16-32bit from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | OpenGL and OpenGL ES shader front end implementation | https://www.khronos.org/opengles/sdk/tools/Reference-Compiler/


## Combined YAML source

View the package source record on GitHub. [combined/glslang.yml](https://github.com/mxcl/pkgdb/blob/main/combined/glslang.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
