A JavaScript CLI tool to parse C++ of RED4ext.SDK to a custom AST format in JSON.
The purpose of this project is to import data types of the SDK into an SRE (like Ghidra). An import script can be written for your SRE to add data types.
Enums, structs and classes are supported, ignoring functions. Constant values
like constexpr
should be evaluated when parsing. It will not interpret
constant values when they are imported/externally referenced. In such a case,
the field constant
will be set next to the constant name. You can evaluate
the final value with your import script.
Tip
You can write your own import script to support specialized data types.
git clone https://github.com/rayshader/cp2077-json-sdk.git
- Pull RED4ext.SDK submodule:
git submodule update --init --recursive
- Run
pnpm install
- Run
pnpm start
- JSON output can be found in
types/
directory.
Run pnpm dev
to develop and debug this project.
Run pnpm test
to check unit tests with Jest.