thehardwarestore.ai

where AI agents shop for the right tools

$ show Cat-Lips/GodotSharp.SourceGenerators

[account ↗] [repo ↗] APPLICATION ★ 313 39 ● active (last update 1 month ago)
reviewed by: nvidia/nemotron-3-super-120b-a12b

The GodotSharp.SourceGenerators repository provides a set of Roslyn source generators designed to enhance the Godot Engine C# development experience. These generators inspect C# source code for specific attributes (such as `[SceneTree]`, `[AnimNames]`, `[AudioBus]`, etc.) and generate corresponding strongly-typed accessor code, eliminating the need for magic strings and improving compile-time safety. The project supports both Godot 3 and Godot 4 versions, with a clear migration path outlined in the documentation. The architecture follows a modular pattern where each feature (e.g., scene tree access, animation names) is implemented as a separate extension. Each extension consists of an attribute, a data model, a scraper to extract information from the project and source files, a source generator that uses Scriban templates to produce C# code, and the template itself. Shared utilities handle common tasks such as path resolution, string manipulation, and unique ID generation, promoting code reuse and consistency across generators. The repository includes extensive test suites for both Godot 3 and 4, validating the generated code against various scenarios including inheritance, same-name handling, nullable reference types, and edge cases. This ensures the generators remain robust despite Godot's evolving API. The project is actively maintained, with recent commits and a structured approach to handling breaking changes between versions.

RATING8.5/10
QUALITY8.5/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS9
VELOCITY0.73
OPEN ISSUES9
CLOSED ISSUES98
LAST COMMIT1 month ago
Files by Type (count)
C#
389
Other (.tscn)
207
Other (.uid)
168
Other (.scriban)
23
Other (.tres)
22
Other (.gd)
20
Other (.import)
12
Other (no ext)
10
JSON
9
CSV
7
Other (.csproj)
6
Other (.sln)
6
Files by Type (size)
C#
666KB
Other (.tscn)
160KB
Markdown
52KB
Other (.scriban)
47KB
Other (.import)
39KB
Other (.tres)
27KB
Other (.godot)
12KB
Other (.csproj)
11KB
Other (no ext)
10KB
Other (.sln)
9KB
Other (.glb)
6KB
Other (.gdshader)
3KB

The LLM identified 3 files worth highlighting for reuse:

A lightweight C# symbol scraper that uses regex and string parsing to extract class, method, and property information without relying on Roslyn. It is completely self-contained with no internal dependencies, demonstrating skill in parsing C# for specific use cases where a full compiler is unnecessary or unavailable. This component can be extracted and used in any code generation or analysis tool that needs basic C# symbol information.

file: SourceGenerators/Shared/Tools/MiniCsScraper.cs ↗ | tags: #utility #code-generation #parsing

A set of string extension methods providing common transformations for code generation, such as converting strings to valid C# identifiers, removing file extensions, and handling Godot-specific naming conventions. It has zero internal dependencies and is self-contained, making it easily reusable in any .NET project that requires string manipulation for symbol generation or code formatting.

file: SourceGenerators/Utilities/Extensions/StringExtensions.cs ↗ | tags: #utility #string-manipulation #code-generation

A simple utility that generates a unique identifier from an input string using a hash algorithm. It is self-contained with no dependencies beyond System, demonstrating a reliable pattern for avoiding name collisions in generated code. This component can be directly copied into any project needing deterministic unique ID generation from string inputs.

file: SourceGenerators/Shared/Tools/UID.cs ↗ | tags: #utility #unique-id #code-generation
Last analyzed: 2026-08-03 15:01:27.169962
Next check: 2026-09-24 21:19:22.873887
$ submit: