https://github.com/tiehuis/zidl
MIDL compiler in Zig
https://github.com/tiehuis/zidl
zig
Last synced: about 1 year ago
JSON representation
MIDL compiler in Zig
- Host: GitHub
- URL: https://github.com/tiehuis/zidl
- Owner: tiehuis
- License: mit
- Created: 2025-05-16T06:59:18.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2025-05-24T13:06:04.000Z (about 1 year ago)
- Last Synced: 2025-05-24T14:39:27.031Z (about 1 year ago)
- Topics: zig
- Language: Zig
- Homepage:
- Size: 230 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# zidl
An IDL Compiler written in Zig.
This is intended as an alternative to more mature projects such as WIDL, for use directly in
the zig compiler.
# Current status
~36.7% passing or near passing.
```
./check-dir mingw-w64/mingw-w64-headers/include/
Total processed: 316
Total Time: 25s 591ms
Skipped (no .h): 7
Minor diffs (<20): 116
Major diffs (≥20): 200
Crashes: 0
Total Diff Lines: 631681
```
# Compatibility
The goal of this compiler is to have output parity with WIDL for the mingw-64 header files. Anything
more is not intended to be supported at this stage.
# Usage
```
zig build
./zig-out/bin/zidl --help
```
```
Usage ./zig-out/bin/zidl: [options] file..
General options:
-h, --help Print this message.
-v, --version Print zidl version.
Compile options:
--winrt Use midl3.0 (default midl2.0)
--skip-imports Don't parse imported files
--stacktrace Render a stacktrace on parse error
--log-level debug|info|warn|err Print all log messages less than requested level
-D= Define a macro for the C preprocessor
Debug options:
--tokens Print a list of tokens produced by the tokenizer
--codegen Perform codegen step (default: true)
--show-failed-optional-parses Render all parsing failures for optional rules
```
# License
MIT Licensed.
This is a clean-room implementation. The PEG grammar has created with help from
WIDL BNF grammar as a reference.