# 使用 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/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-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
- **版本:** 0.7.0
- **来源摘要:** C-family Abstract Syntax Tree XML Output
- **主页:** <https://github.com/CastXML/CastXML>
- **仓库:** <https://github.com/CastXML/castxml>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- castxml (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

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

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

- 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-2.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/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-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


## 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
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
