Skip to content

feat(c#): c# serialization implementation#3383

Merged
chaokunyang merged 35 commits intoapache:mainfrom
chaokunyang:csharp_support
Feb 23, 2026
Merged

feat(c#): c# serialization implementation#3383
chaokunyang merged 35 commits intoapache:mainfrom
chaokunyang:csharp_support

Conversation

@chaokunyang
Copy link
Copy Markdown
Collaborator

@chaokunyang chaokunyang commented Feb 21, 2026

Why?

Introduce aC# implementation of Fory xlang serialization

What does this PR do?

  • Adds the new csharp/ solution and runtime (Fory) with buffer IO, type/metadata resolution, reference tracking, schema hash/version handling, and serializers for primitives, strings, time, enums, unions, optionals, collections, and dictionary variants.
  • Adds Roslyn incremental codegen (Fory.Generator) for [ForyObject]/[Field] to generate serializers, module-level registration, and compile-time diagnostics for unsupported patterns.
  • Adds performance-oriented serializer paths (typed dispatch, specialized primitive collection/dictionary codecs, adaptive string encoding, and map type-info caching).
  • Adds C# tests (csharp/tests/Fory.Tests/ForyRuntimeTests.cs) and the Fory.XlangPeer executable used for cross-language validation.
  • Adds Java-side cross-language coverage via CSharpXlangTest.
  • Extends GitHub CI with .NET 8 C# build/test and C# xlang jobs; updates .gitignore and license mapping for .cs.

Related issues

#1017 #3387
Closes #3392
Closes #3391
Closes #3390
Closes #3389
Closes #3388
Closes #3393

Does this PR introduce any user-facing change?

Yes. This introduces new C# runtime APIs and a source-generator workflow; the wire protocol itself is unchanged.

  • Does this PR introduce any public API change?
  • Does this PR introduce any binary protocol compatibility change?

Benchmark

@chaokunyang chaokunyang changed the title feat(C#): Csharp serialization implementation feat(c#): c# serialization implementation Feb 21, 2026
@chaokunyang chaokunyang merged commit e812dfe into apache:main Feb 23, 2026
64 checks passed
This was referenced Feb 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants