XCompile is a robust tokenizer, parser, and transpiler for translating between programming languages. Current stable version is 0.6.1, released in 2025 with improved Clang parsing, XIR JSON target, and TypeScript emitter enhancements. It uses a custom intermediate representation (XIR) and supports translating Clang AST JSON into TypeScript. Key differentiators include native Clang bindings, ESM-only support (Node >= 20), and built-in CLI. Release cadence is irregular with major features added incrementally.
npm install xcompileNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows basic C to TypeScript transpilation using XCompile class and transpile method.
Use clang.parseRaw for old behavior or update to new clang.parse API.
Existing tokenizer/parser APIs are removed; use new XIR-based pipeline.
Update API calls to use camelCase property names.
Avoid using deprecated options; check current API documentation.
Use ES modules or upgrade Node to >=20.
Pin to a specific minor version if type stability is required.
Use import syntax or set type: module in package.json
Use named import: import { xcompile } from 'xcompile'Run npm install xcompile and use correct import path 'xcompile'
Use clang.parseRaw or upgrade to new clang.parse API
No dependency data recorded yet.