Thank you for your interest in contributing! This is an experimental project exploring IL weaving for zero-cost abstractions in C#.
GitHub: https://github.com/Pouria7/AnAspect.OneOf
This project is in early experimental stage. APIs and behavior may change significantly. We welcome:
- Bug reports and issue discussions
- Performance benchmarks and comparisons
- Documentation improvements
- Test case contributions
- .NET 8+ SDK
- .NET 10+ SDK (for benchmarks)
- Visual Studio 2022 or JetBrains Rider (optional, for IDE support)
dotnet restore
dotnet build OneOf.sln -c Debugdotnet test tests/OneOf.Tests/OneOf.Tests.csprojdotnet run --project tests/OneOf.Benchmarks/OneOf.Benchmarks.csproj -c Release -- --manual- Fork the repository
- Create a branch for your feature/fix
- Write tests for your changes
- Ensure all tests pass
- Update documentation if needed
- Submit a PR with a clear description
- Support for
OneOf<T1, T2, T3>and higher arities - TryGet method IL rewriting
- Field/parameter/return type retargeting
- More comprehensive test coverage
- Performance benchmarks across different scenarios
- Custom serialization support (JSON, MessagePack, etc.)
- Roslyn analyzers for best practices
- Better debugger experience
- Documentation and examples
- LINQ expression tree support
- Async state machine optimization
- Native AOT compatibility testing
When reporting issues, please include:
- .NET version
- Operating system
- Minimal reproducible example
- Expected vs actual behavior
- Whether Fody weaving ran (check for "ProcessedByFody" in assembly)
This project follows these principles:
- Type safety at compile time - Full IntelliSense and compiler checks
- Zero cost at runtime - IL weaving eliminates abstractions
- Simplicity - Minimal API surface, clear transformations
- Transparency - Users should understand what the weaver does
Before contributing to the weaver, familiarize yourself with:
- Mono.Cecil (IL manipulation library)
- Fody (weaving framework)
- .NET IL opcodes and stack behavior
- C# compiler-generated code patterns
- Breaking changes may occur between versions
- Not recommended for production use yet
- IL weaving can be fragile - test thoroughly
- Debugger experience is suboptimal (shows
objectinstead ofOneOf)
- Open GitHub issues for bugs and feature requests
- Discuss design decisions in issue comments before large PRs
- Be respectful and constructive
Thank you for helping make OneOf.Fody better!