diff --git a/README.md b/README.md index a8852bc..468099e 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,31 @@ -# Caa +# Caa - *Generate Beef bindings from C Headers* -Generate Beef bindings out of C headers \ No newline at end of file +This program is still in development and might not work fully, see [TODO](#TODO) for more info on whats missing + +## Dependencies +- [Libclang Beef bindings](https://code.booklordofthe.dev/Booklordofthedings/Libclang-beef) +- [Libclang.dll & Libclang.lib](https://releases.llvm.org/download.html) *(contained in the LLVM download)* + +## CLI +The CLI program is extremely simple and doesnt have much customizeability. +The process is as follows: +- It asks you for the amount of parameters to pass into clang +- You pass in the parameters one after another *(The first one needs to be the file path to the header)* +- The program parses the header *(For debugging purposes it lists all tokens that where not parsed)* +- You input the output file path +- File is output, program is stopped + +## API +- Binding.Bind => Takes in String[] args and generates the in memory model of the header +- Binding.Generate => Creates the string representation and outputs it into the target file +- Binding.CursorHandles => Dictionary containing handlers for specific cursor types, can be extended +- Binding.Options => General Options for binding and generating + +## TODO +- Error handling when opening the header +- Remove the hack, and get Args to actually work on line 31 in Binding +- Booleans should be parsed to Beef bools +- Some libraries (sqlite) use defines for enums/constants. Find a way to parse these +- Parse the output into multiple files +- Type parse function pointers correctly +- Struct fields inside of structs seemingly dont work yet \ No newline at end of file