You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fory.apache.org by "chaokunyang (via GitHub)" <gi...@apache.org> on 2025/12/03 14:02:08 UTC

[PR] docs: refine xlang spec documentation [fory]

chaokunyang opened a new pull request, #2979:
URL: https://github.com/apache/fory/pull/2979

   <!--
   **Thanks for contributing to Apache Fory™.**
   
   **If this is your first time opening a PR on fory, you can refer to [CONTRIBUTING.md](https://github.com/apache/fory/blob/main/CONTRIBUTING.md).**
   
   Contribution Checklist
   
       - The **Apache Fory™** community has requirements on the naming of pr titles. You can also find instructions in [CONTRIBUTING.md](https://github.com/apache/fory/blob/main/CONTRIBUTING.md).
   
       - Apache Fory™ has a strong focus on performance. If the PR you submit will have an impact on performance, please benchmark it first and provide the benchmark result here.
   -->
   
   ## Why?
   
   <!-- Describe the purpose of this PR. -->
   
   ## What does this PR do?
   
   refine xlang spec documentation
   
   ## Related issues
   
   <!--
   Is there any related issue? If this PR closes them you say say fix/closes:
   
   - #xxxx0
   - #xxxx1
   - Fixes #xxxx2
   -->
   
   ## Does this PR introduce any user-facing change?
   
   <!--
   If any user-facing interface changes, please [open an issue](https://github.com/apache/fory/issues/new/choose) describing the need to do so and update the document if necessary.
   
   Delete section if not applicable.
   -->
   
   - [ ] Does this PR introduce any public API change?
   - [ ] Does this PR introduce any binary protocol compatibility change?
   
   ## Benchmark
   
   <!--
   When the PR has an impact on performance (if you don't know whether the PR will have an impact on performance, you can submit the PR first, and if it will have impact on performance, the code reviewer will explain it), be sure to attach a benchmark data here.
   
   Delete section if not applicable.
   -->
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For additional commands, e-mail: commits-help@fory.apache.org


Re: [PR] docs: refine xlang spec documentation [fory]

Posted by "LiangliangSui (via GitHub)" <gi...@apache.org>.
LiangliangSui commented on code in PR #2979:
URL: https://github.com/apache/fory/pull/2979#discussion_r2587404355


##########
docs/specification/xlang_serialization_spec.md:
##########
@@ -164,51 +228,165 @@ Fory will write the byte order for that object into the data instead of converti
 
 ## Fory header
 
-Fory header consists starts one byte:
+Fory header format for xlang serialization:
+
+```
+|    2 bytes   |        1 byte bitmap           |   1 byte   |          optional 4 bytes          |
++--------------+--------------------------------+------------+------------------------------------+
+| magic number |  4 bits reserved | oob | xlang | endian | null |  language  | unsigned int for meta start offset |

Review Comment:
   <img width="1116" height="215" alt="image" src="https://github.com/user-attachments/assets/dd8031bf-f9b1-4c77-9b8d-b178a2011d91" />
   
   This format is unaligned.
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For additional commands, e-mail: commits-help@fory.apache.org


Re: [PR] docs: refine xlang spec documentation [fory]

Posted by "LiangliangSui (via GitHub)" <gi...@apache.org>.
LiangliangSui commented on code in PR #2979:
URL: https://github.com/apache/fory/pull/2979#discussion_r2587194885


##########
docs/specification/xlang_serialization_spec.md:
##########
@@ -955,3 +1470,179 @@ for (const auto &field_info : field_infos) {
   }
 }
 ```
+
+## Implementation Checklist for New Languages

Review Comment:
   Is it necessary to establish a complete benchmark standard?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For additional commands, e-mail: commits-help@fory.apache.org


Re: [PR] docs: refine xlang spec documentation [fory]

Posted by "chaokunyang (via GitHub)" <gi...@apache.org>.
chaokunyang commented on code in PR #2979:
URL: https://github.com/apache/fory/pull/2979#discussion_r2587298917


##########
docs/specification/xlang_serialization_spec.md:
##########
@@ -164,51 +228,165 @@ Fory will write the byte order for that object into the data instead of converti
 
 ## Fory header
 
-Fory header consists starts one byte:
+Fory header format for xlang serialization:
+
+```
+|    2 bytes   |        1 byte bitmap           |   1 byte   |          optional 4 bytes          |
++--------------+--------------------------------+------------+------------------------------------+
+| magic number |  4 bits reserved | oob | xlang | endian | null |  language  | unsigned int for meta start offset |

Review Comment:
   what do mean messy?Could you provide more details? 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For additional commands, e-mail: commits-help@fory.apache.org


Re: [PR] docs: refine xlang spec documentation [fory]

Posted by "LiangliangSui (via GitHub)" <gi...@apache.org>.
LiangliangSui commented on code in PR #2979:
URL: https://github.com/apache/fory/pull/2979#discussion_r2587188618


##########
docs/specification/xlang_serialization_spec.md:
##########
@@ -164,51 +228,165 @@ Fory will write the byte order for that object into the data instead of converti
 
 ## Fory header
 
-Fory header consists starts one byte:
+Fory header format for xlang serialization:
+
+```
+|    2 bytes   |        1 byte bitmap           |   1 byte   |          optional 4 bytes          |
++--------------+--------------------------------+------------+------------------------------------+
+| magic number |  4 bits reserved | oob | xlang | endian | null |  language  | unsigned int for meta start offset |

Review Comment:
   It is messy.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For additional commands, e-mail: commits-help@fory.apache.org


Re: [PR] docs: refine xlang spec documentation [fory]

Posted by "chaokunyang (via GitHub)" <gi...@apache.org>.
chaokunyang commented on code in PR #2979:
URL: https://github.com/apache/fory/pull/2979#discussion_r2587299452


##########
docs/specification/xlang_serialization_spec.md:
##########
@@ -955,3 +1470,179 @@ for (const auto &field_info : field_infos) {
   }
 }
 ```
+
+## Implementation Checklist for New Languages

Review Comment:
   Yes, that would be great



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For additional commands, e-mail: commits-help@fory.apache.org


Re: [PR] docs: refine xlang spec documentation [fory]

Posted by "pandalee99 (via GitHub)" <gi...@apache.org>.
pandalee99 merged PR #2979:
URL: https://github.com/apache/fory/pull/2979


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For additional commands, e-mail: commits-help@fory.apache.org


Re: [PR] docs: refine xlang spec documentation [fory]

Posted by "chaokunyang (via GitHub)" <gi...@apache.org>.
chaokunyang commented on PR #2979:
URL: https://github.com/apache/fory/pull/2979#issuecomment-3607357784

   @pandalee99 It's unnecessary to merge  main branch if there is no conflict


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For additional commands, e-mail: commits-help@fory.apache.org