Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@dameng324
Copy link
Owner

This pull request primarily updates the documentation in README.md to provide a clearer, more comprehensive, and structured explanation of LightProto's features, usage, and differences from protobuf-net. It also adds a new test project to the solution. The most significant changes include a major rewrite and expansion of the serialization API documentation, clarification of .NET Standard and Unity support, and improved guidance on surrogates and runtime type handling.

Documentation improvements and API clarification:

  • Thoroughly rewrote and reorganized the serialization API section to clearly explain generic, dynamic, non-generic, and .NET Standard–specific APIs, including detailed code samples and guidance on ProtoReader/Writer resolution order.
  • Clarified differences from protobuf-net, especially regarding partial classes, surrogates, runtime type model, and string interning, and introduced new sections for StringIntern and RuntimeTypeModel usage.
  • Improved instructions and explanations for working with .NET Standard, including explicit notes about static virtual interface members and Unity/IL2CPP compatibility.
  • Enhanced the migration guide and usage notes for surrogates, including clearer attribute precedence and updated code examples. [1] [2]

General documentation and language improvements:

  • Improved the overall clarity, grammar, and formatting throughout the README, including the features list, code samples, and section headings. [1] [2] [3]

Project structure:

  • Added the new test project LightProto.Cs9Tests to the solution file LightProto.slnx.

Introduces RuntimeProtoParser<T>, RuntimeProtoReader<T>, and RuntimeProtoWriter<T> for runtime message serialization/deserialization. Adds built-in parsers for char, short, ushort, and related 16-bit types. Updates README with detailed usage and API documentation. Registers new public API entries for these features.
Introduced README.zh-CN.md with a full Simplified Chinese translation and updated the English README.md with language switch links and improved section headings using emojis for clarity and visual appeal.
Copilot AI review requested due to automatic review settings January 21, 2026 14:45
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates and expands the documentation for LightProto, adding a Chinese translation and improving the English README with more comprehensive API documentation and usage guidance. The changes also include moving previously unshipped public APIs to the shipped tracking files and adding a new test project to the solution.

Changes:

  • Comprehensive rewrite and expansion of README.md with detailed serialization API documentation, migration guidance, and clarified .NET Standard/Unity support
  • Addition of README.zh-CN.md providing a complete Chinese translation of the documentation
  • PublicAPI tracking files updated to move runtime parser APIs from Unshipped to Shipped status
  • Added LightProto.Cs9Tests project to the solution file

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
README.md Major documentation improvements including expanded serialization API sections, RuntimeTypeModel examples, improved surrogates documentation, and better migration guidance
README.zh-CN.md New Chinese translation of the README with complete feature documentation and code examples
src/LightProto/PublicAPI/netstandard2.0/PublicAPI.Unshipped.txt Cleared unshipped APIs (moved to shipped)
src/LightProto/PublicAPI/netstandard2.0/PublicAPI.Shipped.txt Added 53 runtime parser and serializer APIs to shipped list
src/LightProto/PublicAPI/net/PublicAPI.Unshipped.txt Cleared unshipped APIs (moved to shipped)
src/LightProto/PublicAPI/net/PublicAPI.Shipped.txt Added 53 runtime parser and serializer APIs to shipped list
LightProto.slnx Added LightProto.Cs9Tests project to solution

@codecov
Copy link

codecov bot commented Jan 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.88%. Comparing base (2041909) to head (f46322e).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #170   +/-   ##
=======================================
  Coverage   97.88%   97.88%           
=======================================
  Files         114      114           
  Lines        2365     2365           
  Branches      267      267           
=======================================
  Hits         2315     2315           
  Misses         30       30           
  Partials       20       20           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dameng324 dameng324 merged commit ce6935a into main Jan 21, 2026
8 checks passed
@dameng324 dameng324 deleted the update-readme branch January 21, 2026 15:11
@github-actions
Copy link


BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.3 LTS (Noble Numbat)
Intel Xeon Platinum 8370C CPU 2.80GHz (Max: 2.79GHz), 1 CPU, 4 logical and 2 physical cores
.NET SDK 10.0.101
  [Host]    : .NET 8.0.22 (8.0.22, 8.0.2225.52707), X64 RyuJIT x86-64-v4
  .NET 10.0 : .NET 10.0.2 (10.0.2, 10.0.225.61305), X64 RyuJIT x86-64-v4
  .NET 8.0  : .NET 8.0.22 (8.0.22, 8.0.2225.52707), X64 RyuJIT x86-64-v4
  .NET 9.0  : .NET 9.0.12 (9.0.12, 9.0.1225.60609), X64 RyuJIT x86-64-v4


Method Job Runtime Mean Error StdDev Ratio Allocated Alloc Ratio
Deserialize_ProtoBuf_net .NET 10.0 .NET 10.0 766.8 μs 1.34 μs 1.19 μs 1.52 562 KB 0.98
Deserialize_GoogleProtoBuf .NET 10.0 .NET 10.0 588.9 μs 1.49 μs 1.32 μs 1.16 648.7 KB 1.13
Deserialize_LightProto .NET 10.0 .NET 10.0 505.5 μs 2.28 μs 2.14 μs 1.00 574.8 KB 1.00
Deserialize_ProtoBuf_net .NET 8.0 .NET 8.0 874.4 μs 1.04 μs 0.87 μs 1.48 562 KB 0.98
Deserialize_GoogleProtoBuf .NET 8.0 .NET 8.0 891.7 μs 1.12 μs 0.99 μs 1.51 648.7 KB 1.13
Deserialize_LightProto .NET 8.0 .NET 8.0 589.3 μs 1.32 μs 1.03 μs 1.00 574.8 KB 1.00
Deserialize_ProtoBuf_net .NET 9.0 .NET 9.0 810.5 μs 0.86 μs 0.72 μs 1.41 562 KB 0.98
Deserialize_GoogleProtoBuf .NET 9.0 .NET 9.0 729.3 μs 1.15 μs 1.02 μs 1.27 648.7 KB 1.13
Deserialize_LightProto .NET 9.0 .NET 9.0 574.0 μs 1.19 μs 1.05 μs 1.00 574.8 KB 1.00

BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.3 LTS (Noble Numbat)
Intel Xeon Platinum 8370C CPU 2.80GHz (Max: 2.79GHz), 1 CPU, 4 logical and 2 physical cores
.NET SDK 10.0.101
  [Host]    : .NET 8.0.22 (8.0.22, 8.0.2225.52707), X64 RyuJIT x86-64-v4
  .NET 10.0 : .NET 10.0.2 (10.0.2, 10.0.225.61305), X64 RyuJIT x86-64-v4
  .NET 8.0  : .NET 8.0.22 (8.0.22, 8.0.2225.52707), X64 RyuJIT x86-64-v4
  .NET 9.0  : .NET 9.0.12 (9.0.12, 9.0.1225.60609), X64 RyuJIT x86-64-v4


Method Job Runtime Mean Error StdDev Ratio RatioSD Allocated Alloc Ratio
Serialize_ProtoBuf_net .NET 10.0 .NET 10.0 871.1 μs 3.40 μs 3.02 μs 1.33 0.01 526.41 KB 1.03
Serialize_GoogleProtoBuf .NET 10.0 .NET 10.0 758.7 μs 5.45 μs 5.10 μs 1.16 0.01 512.95 KB 1.00
Serialize_LightProto .NET 10.0 .NET 10.0 654.1 μs 3.10 μs 2.75 μs 1.00 0.01 512.92 KB 1.00
Serialize_ProtoBuf_net .NET 8.0 .NET 8.0 1,005.7 μs 2.90 μs 2.57 μs 1.32 0.01 526.4 KB 1.03
Serialize_GoogleProtoBuf .NET 8.0 .NET 8.0 779.6 μs 4.80 μs 4.01 μs 1.02 0.01 512.95 KB 1.00
Serialize_LightProto .NET 8.0 .NET 8.0 764.0 μs 9.42 μs 8.81 μs 1.00 0.02 512.92 KB 1.00
Serialize_ProtoBuf_net .NET 9.0 .NET 9.0 954.0 μs 3.82 μs 3.39 μs 1.30 0.01 526.4 KB 1.03
Serialize_GoogleProtoBuf .NET 9.0 .NET 9.0 775.9 μs 11.74 μs 10.98 μs 1.06 0.02 512.95 KB 1.00
Serialize_LightProto .NET 9.0 .NET 9.0 732.1 μs 5.16 μs 4.83 μs 1.00 0.01 512.92 KB 1.00

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants