You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/DevManual.md
+20Lines changed: 20 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -65,6 +65,26 @@ The target runtime needs to support calling native methods and this is usually
65
65
implemented with an FFI (foreign function interface) in the target language VM
66
66
virtual machine). In .NET this is done via the P/Invoke system.
67
67
68
+
69
+
# For Contributors
70
+
71
+
## Updating Parser Bindings
72
+
73
+
CppSharp uses its own code, to parse and generate C# bindings from (clang) source.
74
+
- You will need the following [headers package](https://github.com/mono/CppSharp/releases/download/CppSharp/headers.zip), which will allow you to generate bindings for all platforms.
75
+
- Simply place these in `<repo_root_dir>/build/headers/<target_triple>`.
76
+
- To update the clang bindings, first run the project `CppSharp.Parser.Bootstrap`.
77
+
- This will generate a source code patch in a folder called 'BootstrapPatch'.
78
+
- Finally, run `CppSharp.Parser.Gen` to generate the C# and C++/CLI bindings.
79
+
- This project will first build and run using the old bindings and then override the files with the bootstrap patch source
80
+
- This means it's possible you need to run this process twice to generate all bindings (in cases where new bindings will cause new source to be parsed, eg. when new language features are added)
81
+
82
+
- To add or remove code in parser source that is not yet automatically generated
83
+
- Make your changes
84
+
- Copy them to a new folder in `<repo_root_dir>/BootstrapPatch`
85
+
- Discard the copied changes using git
86
+
- Finally, run `CppSharp.Parser.Gen` to generate the C# and C++/CLI bindings
0 commit comments