Skip to content

Commit 1a10b65

Browse files
committed
Add light docs for ClangScraper mod
1 parent e6021c7 commit 1a10b65

1 file changed

Lines changed: 30 additions & 19 deletions

File tree

docs/for-contributors/Generator/generator-mods.md

Lines changed: 30 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ to be after that mod.
7575

7676
### AddIncludes
7777

78-
Mod categories:
78+
Mod categories: Creation
7979

8080
This mod interacts with `ClangScraper` by providing standard include directories and other user-specified include paths
8181
to `ClangScraper`.
@@ -86,7 +86,7 @@ This should be positioned at the start of the mod order.
8686

8787
### AddOpaqueStructs
8888

89-
Mod categories:
89+
Mod categories: Creation
9090

9191
This mod adds an empty struct for each name specified in its mod configuration.
9292

@@ -96,7 +96,7 @@ Usage recommendations:
9696

9797
### AddVTables
9898

99-
Mod categories:
99+
Mod categories: Transformation
100100

101101
This mod transforms `[DllImport]` and `[Transformed]` methods to use Silk-style virtual tables. These vtables allow for
102102
different styles of accessing native APIs, such as through an instance of an API object or through static methods.
@@ -107,7 +107,7 @@ Usage recommendations:
107107

108108
### BakeSourceSets
109109

110-
Mod categories:
110+
Mod categories: Transformation
111111

112112
This mod merges multiple sets of source code into one set of source code.
113113

@@ -117,7 +117,7 @@ Usage recommendations:
117117

118118
### ChangeNamespace
119119

120-
Mod categories:
120+
Mod categories: Transformation
121121

122122
This mod moves types from one namespace to another.
123123

@@ -127,7 +127,7 @@ Usage recommendations:
127127

128128
### ChangeNativeClass
129129

130-
Mod categories:
130+
Mod categories: Transformation
131131

132132
This mod moves members from one type to another.
133133

@@ -137,19 +137,30 @@ Usage recommendations:
137137

138138
### ClangScraper
139139

140-
Mod categories:
140+
Mod categories: Creation
141+
142+
This is a critical mod used to generate the initial set of raw C# bindings for C APIs. The use of this mod is equivalent
143+
to using `ClangSharpPInvokeGenerator`. The C# source code generated by this mod is typically the starting point for all
144+
of the transformations done by the rest of the SilkTouch mods.
141145

142146
Usage recommendations:
143147

148+
This mod is configured differently from the rest of the mods. The JSON mod configuration follows the same pattern as the
149+
rest of the mods, but the bulk of the configuration comes in the form of `.rsp` files. These `.rsp` files represent the
150+
command line arguments passed to `ClangSharpPInvokeGenerator`. More information about how to use this mod and how to
151+
configure the generator as a whole is found in the [Using the Generator](using-the-generator.md) documentation.
152+
153+
This mod should be positioned at the start of the mod order, after `AddIncludes`.
154+
144155
### ExtractHandles
145156

146-
Mod categories:
157+
Mod categories: Creation
147158

148159
Usage recommendations:
149160

150161
### ExtractNestedTyping
151162

152-
Mod categories:
163+
Mod categories: Creation
153164

154165
Name affix categories:
155166

@@ -159,7 +170,7 @@ Usage recommendations:
159170

160171
### IdentifySharedPrefixes
161172

162-
Mod categories:
173+
Mod categories: Metadata, Naming
163174

164175
Name affix categories:
165176

@@ -169,7 +180,7 @@ Usage recommendations:
169180

170181
### InterceptNativeFunctions
171182

172-
Mod categories:
183+
Mod categories: Transformation
173184

174185
Name affix categories:
175186

@@ -179,13 +190,13 @@ Usage recommendations:
179190

180191
### MarkNativeNames
181192

182-
Mod categories:
193+
Mod categories: Metadata, Naming
183194

184195
Usage recommendations:
185196

186197
### MixKhronosData
187198

188-
Mod categories:
199+
Mod categories: Creation, Metadata, Naming, Transformation
189200

190201
Name affix categories:
191202

@@ -200,25 +211,25 @@ Usage recommendations:
200211

201212
### PrettifyNames
202213

203-
Mod categories:
214+
Mod categories: Naming, Transformation
204215

205216
Usage recommendations:
206217

207218
### StripAttributes
208219

209-
Mod categories:
220+
Mod categories: Metadata
210221

211222
Usage recommendations:
212223

213224
### TransformEnums
214225

215-
Mod categories:
226+
Mod categories: Transformation
216227

217228
Usage recommendations:
218229

219230
### TransformFunctions
220231

221-
Mod categories:
232+
Mod categories: Transformation
222233

223234
Name affix categories:
224235

@@ -228,7 +239,7 @@ Usage recommendations:
228239

229240
### TransformHandles
230241

231-
Mod categories:
242+
Mod categories: Transformation
232243

233244
Name affix categories:
234245

@@ -238,7 +249,7 @@ Usage recommendations:
238249

239250
### TransformProperties
240251

241-
Mod categories:
252+
Mod categories: Transformation
242253

243254
Usage recommendations:
244255

0 commit comments

Comments
 (0)