Generate headers from ILE C headers
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
Research direction
No implementation file or test is identified in the issue. Start by examining the existing PGMFunction and ILEFunction wrappers, then evaluate the proposed tree-sitter or libclang parsing and preprocessing paths, including ILE C system headers and ABI rules. Done would mean a defined approach for generating wrappers and preserving structures, macros, and layout.
Written by the indexing model from the issue text.
Description
While this makes calling programs/procedures pretty easy, you might still need to copy and paste (and adapt) structure definitions and still write the PGMFunction/ILEFunction definitions. What'd be nice is being able to point to a header and extract definitions.
Likely challenges:
- Turn function definitions into the previously mentioned wrappers, preserve structures. Preserve macros perhaps too, since they may be used for i.e. enum fields. Unsure of function pointer types, or data symbols (we need a wrapper type for this).
- Deal with ILE C extensions, i.e.
_Packedthat are present in system headers. Either handle them in parsing or preprocess to convert them to the GCC extensions (which are still incompatible with strict standard C parsers...). - Preserve ABI layout in the AIX version of the structure.
longis 32-bit in ILE C, and pointers are 128-bit (well, unless Teraspace is used, but there are pragmas to control this). - It might be wise to run the preprocessor (or at least unifdef) ahead of time, since there are some funny constructs that trip up i.e. tree-sitter and libclang unless we do that (i.e. use #ifdef for using #pragma for linkage control rather than
extern "OSfor OPM).- This means figuring out what stock definitions we need to set, what pragmas we need to keep and understand.
- For #include, make sure we're importing the ILE C and not OS one (for i.e.
sys/types.h. This likely means making a copy of the system headers and dumping them into a sysroot for GCC CPP (and hoping GCC CPP can understand), or a C preprocessor that we have finer grained control of.
What would be nice is an IDL for system APIs that we can generate from rather than parsing C, but that precludes user things (unless they conform to said IDL).
- Dominant language
- C++
- Stars
- 3
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from SeidenGroup/pase-cpp
-
Generate from PCMLOpenenhancement
Difficulty 5/5 Over a week Newbie friendliness 35/100
SeidenGroup/pase-cpp#7 ·
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 25/100
SeidenGroup/pase-cpp#2 ·
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 25/100
SeidenGroup/pase-cpp#1 ·
All issues in SeidenGroup/pase-cpp
Similar issues
-
bug chart-audit
Difficulty 1/5 Under an hour Newbie friendliness 92/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
godotengine/godot#124120 ·
Maintainers usually reply within 1 day
-
HasBacktrace Priority-Critical
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
azerothcore/azerothcore-wotlk#27921 ·
Maintainers usually reply within 1 day
-
area/ysql kind/bug priority/medium
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
yugabyte/yugabyte-db#34584 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
Maintainers usually reply within 1 day