SourceGen Utils
SourceGen Utils is a collection of utilities for C# source generators that get emitted directly into your source generator assembly, thus zero dependencies!
- Zero dependencies - Your assembly can be distributed as a single
dllfile without any additional dependencies - Only use what you need - The generator emits lightweight shells and implements only the methods you use; the trimmer removes the rest.
- High performance utilities - The utilities are designed to be high performance and low allocation using
ArrayPool<T>andSpan<T>where possible. - Thread-safe pools - The included object pools are designed to be thread-safe and can be used in multi-threaded source generators.
Get startedInstall SourceGen Utils and start using it in your source generators.
Explore APIBrowse the SourceGen Utils API documentation.