chaokunyang commented on PR #2898:
URL: https://github.com/apache/fory/pull/2898#issuecomment-3565331566

   Could we remove `compress_int` API. The xlang is different pure java. In 
pure java, we only write code once to create fory. Now in xlang mode, we crate 
fory in every language, adding too much options is error-prone to introduce 
inconsistency. And rust don't support generate code dynamically, such option 
also introduce runtime cost. 
   
   I prefer a macro attr:
   ```rust
   struct Foo {
     [#fory(compress=False)]
     f1: i32
   }
   ```
   
   For java, we can create an annotation:
   ```java
   class Foo {
     @ForyField(compress=false)
     int f1:
   }
   ```
   
   For python, we can create a `field` method like dataclass decorator.
   
   We can support `#fory(compress=False)` for pure rust in this pr, so we don't 
have to support java annotation or python `field` in this pr


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to