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

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

## 安装

```sh
sudo av install brew:castxml
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install castxml
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install castxml
```

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

### Linux

- Debian apt (92%):

```sh
sudo apt install castxml
```

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

- dnf (92%):

```sh
sudo dnf install castxml
```

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

- Nix (92%):

```sh
nix profile install nixpkgs#castxml
```

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

- pacman (92%):

```sh
sudo pacman -S castxml
```

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

- zypper (92%):

```sh
sudo zypper install CastXML-devel
```

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

### Windows

- Scoop (92%):

```sh
scoop install main/castxml
```

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

## 软件包事实

- **软件包键:** brew:castxml
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/castxml>
- **版本:** 0.7.0
- **来源摘要:** C-family Abstract Syntax Tree XML Output
- **主页:** <https://github.com/CastXML/CastXML>
- **仓库:** <https://github.com/CastXML/CastXML>
- **许可证:** Apache-2.0
- **源码归档:** <https://github.com/CastXML/CastXML/archive/refs/tags/v0.7.0.tar.gz>
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- castxml (cli)
- castxml (别名)

## 依赖

- llvm

## 构建依赖

- cmake

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 0.7.0
- 本地数据: OK
- 上游仓库: https://github.com/CastXML/CastXML
- 检测到的最新版本: v0.7.0 (当前)
- 信息: No package-manager update timestamp was available.
## 项目历史与用法

CastXML is a developer tool that parses C-family source files and writes a subset of the abstract syntax tree as XML. The upstream README describes it as maintained by Kitware in support of ITK, the Insight Segmentation and Registration Toolkit.

### 项目历史

The project is built around LLVM/Clang: its manual says source files are parsed as complete translation units by an internal Clang compiler. It also includes a --castxml-gccxml mode that emits XML close to GCC-XML, making it important for code-generation and binding workflows that previously expected GCC-XML-style output.

### 采用历史

The supplied package facts show CastXML distributed across Homebrew, Debian, Fedora, MacPorts, Nix, Arch, Scoop, Ubuntu, and openSUSE. That breadth matches its niche but durable role as infrastructure for C/C++ introspection workflows rather than an end-user command.

### 使用方式

Typical use is command-line AST extraction: pass source files, Clang options, and CastXML options, then request XML output with --castxml-output or GCC-XML-compatible output with --castxml-gccxml. The manual also documents compiler-target matching with --castxml-cc-* options.

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

CastXML is package-nerd significant because it packages compiler-internal structure as a stable CLI artifact. It lets downstream tools depend on a packaged executable instead of embedding all of Clang's C++ APIs or reviving GCC-XML.

### 时间线

- 2026: The README lists support for LLVM/Clang releases through 22.1 and git master as of 2026-06-10.
- 2026: Homebrew formula packages v0.7.0 from the official release archive.

### Related projects

- Related projects and technologies include LLVM/Clang, GCC-XML, CMake, and ITK; the README explicitly ties CastXML maintenance to Kitware's support of ITK.

### 来源

- <https://api.github.com/repos/CastXML/CastXML>
- <https://github.com/CastXML/CastXML>
- <https://github.com/CastXML/CastXML/blob/master/doc/manual/castxml.1.rst>
- <https://github.com/CastXML/CastXML#readme>
- <https://formulae.brew.sh/api/formula/castxml.json>
- <https://github.com/CastXML/CastXML/releases>


## 安全说明

narrow executable package without higher-risk signals.

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

## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** castxml
- **Version Scheme:** 0
- **Revision:** 1
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

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

- Debian apt - castxml - 0.6.11-1: normalized package name match | Debian stable package indexes: castxml from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | C-family abstract syntax tree XML output tool | https://github.com/CastXML/CastXML
- Nix - castxml: normalized package name match | nixpkgs package indexes: pkgs/by-name/ca/castxml/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - castxml - 0.6.3-1build2: normalized package name match | Ubuntu 24.04 LTS package indexes: castxml from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | C-family abstract syntax tree XML output tool | https://github.com/CastXML/CastXML
- dnf - castxml - 0.7.0-3.fc45: normalized package name match | Fedora Rawhide package metadata: castxml from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | C-family abstract syntax tree XML output tool | https://github.com/CastXML/CastXML
- pacman - castxml - 0.7.0-2: normalized package name match | Arch Linux sync databases: castxml from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | C-family abstract syntax tree XML output tool | https://github.com/CastXML/CastXML
- zypper - CastXML-devel - 0.7.0-1.6: normalized package name match | openSUSE Tumbleweed package metadata: CastXML-devel from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | C-family Abstract Syntax Tree XML Output | https://github.com/CastXML/CastXML
- MacPorts - castxml: normalized package name match | MacPorts ports tree: lang/castxml/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Scoop - main/castxml: normalized package name match | Scoop official bucket manifest trees: bucket/castxml.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1


## 相关链接

- [Source-control packages](https://pkg.so/zh-hans/source-control-tools/) - Belongs to a source-control command family.
- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://pkg.so/zh-hans/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://pkg.so/zh-hans/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [llvm](https://pkg.so/zh-hans/brew/llvm/) - Runtime dependency declared by Homebrew.
- [cmake](https://pkg.so/zh-hans/brew/cmake/) - Build dependency declared by Homebrew.
- [ccache](https://pkg.so/zh-hans/brew/ccache/) - Shares pkgdb curated category or tags: c, c-plus-plus, clang, cli, developer-tools.
- [swig](https://pkg.so/zh-hans/brew/swig/) - Shares pkgdb curated category or tags: c, c-plus-plus, cli, developer-tools.
- [gdb](https://pkg.so/zh-hans/brew/gdb/) - Shares pkgdb curated category or tags: c, c-plus-plus, cli, developer-tools.
- [enchant](https://pkg.so/zh-hans/brew/enchant/) - Shares pkgdb curated category or tags: c, c-plus-plus, cli, developer-tools.
- [emscripten](https://pkg.so/zh-hans/brew/emscripten/) - Shares pkgdb curated category or tags: c, c-plus-plus, cli, developer-tools.
- [cppcheck](https://pkg.so/zh-hans/brew/cppcheck/) - Shares pkgdb curated category or tags: c, c-plus-plus, cli, developer-tools.
- [valgrind](https://pkg.so/zh-hans/brew/valgrind/) - Shares pkgdb curated category or tags: c, c-plus-plus, cli, developer-tools.
- [astyle](https://pkg.so/zh-hans/brew/astyle/) - Shares pkgdb curated category or tags: c, c-plus-plus, cli, developer-tools.
- [rtags](https://pkg.so/zh-hans/brew/rtags/) - Local package facts share a topical domain. Shared terms: c-plus-plus, clang, cli, developer, developer-tools.
- [ccls](https://pkg.so/zh-hans/brew/ccls/) - Local package facts share a topical domain. Shared terms: c, c-plus-plus, cli, developer, developer-tools.
- [clang-uml](https://pkg.so/zh-hans/brew/clang-uml/) - Local package facts share a topical domain. Shared terms: c, clang, cli, developer, developer-tools.

## Combined YAML source

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


## 来源

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