Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Pascal
  3. Chet - C Header Translator for Delphi

Chet - C Header Translator for Delphi

BSD-2-ClausePascalv1.4.1

A C header to Delphi Pascal translator using libclang for accurate conversion of C libraries.

GitHubGitHub
225 stars49 forks0 contributors

What is Chet - C Header Translator for Delphi?

Chet is a specialized tool that translates C header files (.h) into Delphi Pascal units (.pas), enabling Delphi developers to easily interface with C libraries. It leverages the Clang compiler via libclang for Delphi to parse C code, resulting in more accurate translations with fewer manual fixes compared to other translators. The tool automates the conversion of data types, functions, and conditional compilation directives, bridging the C and Delphi ecosystems.

Target Audience

Delphi developers who need to interface with C libraries, such as those working on multi-platform applications (Windows, macOS, Linux, iOS, Android) or integrating third-party C-based APIs and SDKs into Delphi projects.

Value Proposition

Developers choose Chet over alternatives because it uses the actual Clang compiler for parsing, which improves accuracy and handles complex C constructs like conditional compilation. It offers extensive customization options, bulk translation of entire directories, and multi-platform support from a single configuration, reducing manual effort and errors.

Overview

C Header Translator for Delphi

Use Cases

Best For

  • Translating C header files to Delphi units for interfacing with C libraries in multi-platform projects.
  • Automating the conversion of entire directories of C headers into a single Delphi .pas file with managed dependencies.
  • Generating Delphi bindings for C libraries with accurate handling of structs, unions, enums, and procedural types.
  • Preserving or converting Doxygen-style comments to XmlDoc or PasDoc formats in Delphi code.
  • Configuring translations with a GUI and saving settings to reusable project files for repeated use.
  • Targeting specific platforms (e.g., Windows, macOS, Linux, iOS, Android) with customized library names and calling conventions.

Not Ideal For

  • Projects involving C++ libraries or headers, as Chet explicitly does not support C++.
  • Developers working on non-Windows systems or without Visual Studio, due to its dependency on Windows C development tools.
  • Teams translating headers with heavy platform-specific conditional compilation for target platforms different from the build system, since parsing is system-dependent.

Pros & Cons

Pros

Clang-Powered Accuracy

Uses the Clang compiler to parse C headers, handling conditional compilation and complex constructs with fewer manual fixes, as highlighted in the README for improved translation quality.

Multi-Platform Output

Generates Delphi code for Windows, macOS, Linux, iOS, and Android from a single configuration, streamlining cross-development efforts without separate setups.

Bulk Translation Efficiency

Processes entire directories of header files into one .pas file, automatically managing dependencies between headers to reduce integration issues.

Extensive Customization Options

Offers configurable settings for calling conventions, comment handling, enum conversion, and reserved word adjustments, allowing tailored output for specific project needs.

Cons

C-Only Limitation

Does not support C++ header files, restricting its use for modern libraries that often rely on C++ features, as admitted in the README limitations.

System-Dependent Parsing

Relies on the host system's Clang configuration, so parsing can be skewed by platform-specific defines (e.g., _WIN32 on Windows), potentially missing code for other targets and requiring manual intervention.

Complex Setup Requirements

Requires installation of external dependencies like LLVM/Clang and a C development environment such as Visual Studio, adding setup overhead before translation can begin.

Frequently Asked Questions

Quick Stats

Stars225
Forks49
Contributors0
Open Issues10
Last commit1 month ago
CreatedSince 2018

Tags

#clang#language-interop#pascal#c#libclang#delphi#cross-platform#code-generation

Built With

D
Delphi

Included in

Pascal2.0k
Auto-fetched 1 day ago

Related Projects

Delphi.gitignoreDelphi.gitignore

A collection of useful .gitignore templates

Stars174,174
Forks82,458
Last commit10 days ago
BossBoss

Dependency Manager for Delphi and Lazarus

Stars601
Forks100
Last commit4 days ago
C-To-DelphiC-To-Delphi

C To Delphi converter

Stars283
Forks81
Last commit8 years ago
WMI Delphi Code CreatorWMI Delphi Code Creator

Generate Object Pascal (Delphi, FPC), Oxygene, C++ and C# code to access the WMI

Stars196
Forks46
Last commit1 year ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub