-
Notifications
You must be signed in to change notification settings - Fork 0
Source Generator
Phawit Pornwattanakul edited this page Sep 17, 2025
·
1 revision
In Sakura, we use source generator for flexibility between type, extending functionality in the framework and reducing code duplication.
All source generator code live in Sakura.Framework.SourceGenerators
For the reference of generated code, see reference repository
- Area :
Sakura.Framework.Maths - Generator :
Sakura.Framework.SourceGenerators.Generators.MathStructGenerator - Requirement :
struct that haveMathStruct` attribute
This generator will create a method and constructor based on the System.Numerics type and bind it to the Sakura.Framework.Maths type (e.g. Sakura.Framework.Maths.Vector2 the generator will get all the available constructor and method from System.Numerics.Vector2 to make it all available in ``Sakura.Framework.Maths.Vector2`)