castxml
« Back to VersTracker
Description:
C-family Abstract Syntax Tree XML Output
Type: Formula  |  Latest Version: 0.6.13@0  |  Tracked Since: Dec 17, 2025
Links: Homepage  |  formulae.brew.sh
Category: Developer tools
Tags: c++ ast xml clang static-analysis code-generation
Install: brew install castxml
About:
CastXML is a command-line tool that generates XML output from C, C++, and Objective-C source code by leveraging the Clang compiler frontend. It provides a structured representation of the Abstract Syntax Tree (AST), enabling other tools to parse and analyze code structure without implementing a full compiler front-end. This makes it a foundational component for static analysis, code documentation, and interoperability tools.
Key Features:
  • Outputs XML representations of C/C++/Objective-C ASTs
  • Leverages the robust Clang compiler frontend for accurate parsing
  • Provides a stable API for tool developers to consume code structure
  • Supports cross-platform static compilation
Use Cases:
  • Generating code documentation from source ASTs
  • Building static analysis and linting tools
  • Creating bindings for other programming languages (e.g., Python, Fortran)
Alternatives:
  • libclang – Provides a C API for the Clang AST, but CastXML offers a simpler, XML-based output that is easier to consume for non-C++ tools.
  • c2xml – An older tool for C code, whereas CastXML supports modern C++ and Objective-C features via Clang.
License: Apache-2.0
Dependencies: llvm
Bottles available for: arm64_tahoe, arm64_sequoia, arm64_sonoma, arm64_ventura, sonoma, ventura, arm64_linux, x86_64_linux
Version History
Detected Version Rev Change Commit
Sep 13, 2025 6:46am 0 VERSION_BUMP 6991a46f
Sep 29, 2024 1:46pm 2 VERSION_BUMP 7684109e
Sep 11, 2024 11:38am 0 VERSION_BUMP 5ce7dd67
Jul 8, 2024 4:08pm 0 VERSION_BUMP 12cfd061
Jul 8, 2024 3:25pm 0 VERSION_BUMP ba99acf2
Jul 2, 2024 10:29pm 0 VERSION_BUMP fa55b59f
May 3, 2024 9:22pm 0 VERSION_BUMP 57cee4f0
Apr 17, 2024 9:12pm 0 VERSION_BUMP a11e3c6b
Dec 15, 2023 9:37pm 1 VERSION_BUMP 1507cb49
Sep 19, 2023 9:24pm 0 VERSION_BUMP 6d59c3c9
Mar 22, 2023 2:31am 1 VERSION_BUMP 851468e8