@@ -13,7 +13,9 @@ Capitalization Conventions: https://learn.microsoft.com/en-us/dotnet/standard/de
1313## High-Level Overview
1414
1515This section explains how names flow through the SilkTouch generator pipeline.
16- This section uses ` vkCreateSwapchainKHR ` from Vulkan as an example.
16+ - For more information about the pipeline itself, please see the [ Generator Mods] ( generator-mods.md ) documentation.
17+
18+ ` vkCreateSwapchainKHR ` from Vulkan is used here as an example.
1719
18201 . Names enter the pipeline from native sources (eg: C header files).
1921 - Eg: ` vkCreateSwapchainKHR ` as input from Vulkan during the ` ClangScraper ` mod.
@@ -25,19 +27,28 @@ This section uses `vkCreateSwapchainKHR` from Vulkan as an example.
2527
26283 . ` PrettifyNames ` uses the metadata to transform the names according to user-provided configuration.
2729 - The affixes are first stripped → ` CreateSwapchain `
28- - The base name is "prettified" (pascal-casing, removal of underscores) → ` CreateSwapchain ` (No change)
30+ - The base name is "prettified" (pascal-casing, removal of underscores) → ` CreateSwapchain ` (No change in this case )
2931 - Affixes are reapplied according to user configuration → ` CreateSwapchainKHR `
30- - We usually remove shared prefixes and preserve Khronos vendor suffixes.
32+ - We usually remove shared prefixes and preserve Khronos vendor suffixes verbatim
33+ (notably in contradiction with the Framework Design Guidelines).
34+ The reasons for this are explained below.
3135
32- 4 . Unwanted metadata is stripped from the generated bindings to keep the output clean.
33- - ` [NativeName] ` is kept. ` [NameAffix] ` is removed.
36+ 4 . Mods strip most metadata from the generated bindings to keep the output clean.
37+ - We generally keep metadata useful for users, while removing internal generator metadata.
38+ - For example, ` [NativeName] ` is kept and ` [NameAffix] ` is removed during the ` StripAttributes ` mod.
3439 - Tip: Disabling the ` StripAttributes ` mod can be helpful for debugging unwanted outputs.
3540
36- (TODO: Elaborate more and provide examples)
37-
3841## PrettifyNames
3942
40- (TODO: Explain how PrettifyNames is the mod central to name processing)
43+ As seen above, ` PrettifyNames ` is the mod central to name processing.
44+
45+ The goal of this mod is to take all of the names from the generated bindings and transform them in bulk.
46+ This keeps other mods performant and simple, as renaming identifiers is a costly operation
47+ that involves searching the entire project for references to that identifier.
48+ Despite this, ` PrettifyNames ` also has the goal of remaining dumb and does this
49+ by relying on the generator config for all major decisions.
50+
51+ (TODO: Explain how other mods and the user are supposed to interact with PrettifyNames)
4152
4253## Name Splitting
4354
0 commit comments