From 4cdfd5bcbadb5fe49da7c5e108e42a34b7878ad1 Mon Sep 17 00:00:00 2001 From: realtradam Date: Thu, 3 Mar 2022 23:00:48 -0500 Subject: init --- Readme.mdown | 21 +++++++++++++++++++++ scan.rb | 1 + 2 files changed, 22 insertions(+) create mode 100644 Readme.mdown create mode 100644 scan.rb diff --git a/Readme.mdown b/Readme.mdown new file mode 100644 index 0000000..52d5546 --- /dev/null +++ b/Readme.mdown @@ -0,0 +1,21 @@ +# FelBind + +A binding assistant and generator for C/C++ to mruby + + +### How I plan for it to work: + +1. Run the scanner to scan the code and collect all functions and place them into a generation config file +2. Edit the configuration to customize how things should be bound + - for example, under what module or class a function should belong + - if a certain param should use self instead of passing in something + - ignore some functions if you dont need them + - insert bindings you made yourself +3. Run the configuration file - this generates the resulting code and header files + +Todo: + +- [X] parse C files for function and struct declarations +- [ ] design DSL for configuration file +- [ ] code configuration DSL to output valid C code +- [ ] make C parser generate configuration file diff --git a/scan.rb b/scan.rb new file mode 100644 index 0000000..2966f43 --- /dev/null +++ b/scan.rb @@ -0,0 +1 @@ +`ctags --output-format=json --c-kinds=pmz --language-force=c raylib.h` # convert to json -- cgit v1.2.3