This is an automated email from the ASF dual-hosted git repository. chaokunyang pushed a commit to branch release_0.13.1 in repository https://gitbox.apache.org/repos/asf/fory-site.git
commit 7fbe5bea5d9d5c7d5788473b5f804b21975cd3f3 Author: chaokunyang <[email protected]> AuthorDate: Thu Nov 6 12:37:46 2025 +0800 add release blog for 0.13.1 --- blog/2025-11-06-fory_0_13_1_release.md | 118 +++++++++++++++++++++++++++++++++ 1 file changed, 118 insertions(+) diff --git a/blog/2025-11-06-fory_0_13_1_release.md b/blog/2025-11-06-fory_0_13_1_release.md new file mode 100644 index 000000000..1f3f4a924 --- /dev/null +++ b/blog/2025-11-06-fory_0_13_1_release.md @@ -0,0 +1,118 @@ +--- +slug: fory_0_13_1_release +title: Fory v0.13.1 Released +authors: [chaokunyang] +tags: [fory, rust] +--- + +The Apache Fory team is pleased to announce the 0.13.1 release. This is a release that includes [28 PR](https://github.com/apache/fory/compare/v0.13.0...v0.13.1) from 11 distinct contributors. See the [Install](https://fury.apache.org/docs/docs/start/install) Page to learn how to get the libraries for your platform. + +## Highlights + +- Support rust enum variant and schema evolution for tuple/struct style enum +- Support rust tuple serialization and schema evolution +- Support rust skip macro attributes + +### Enum Schema Evolution + +Fory v0.13.1 adds comprehensive enum schema evolution in Compatible mode, supporting all three variant types (Unit, Unnamed, Named): + +- **Add/remove variants**: Unknown variants fall back to `#[fory(default)]` +- **Add/remove fields**: Named variants support field evolution with automatic defaults +- **Modify elements**: Unnamed variants handle element count changes (extras skipped, missing use defaults) +- **Variant type changes**: Convert between Unit/Unnamed/Named with automatic default values + +```rust +// Version 1 +#[derive(ForyObject)] +enum Command { + #[fory(default)] + Noop, + Execute { name: String, args: i32 }, +} + +// Version 2 - Added field and new variant +// both `fory(default)` and standard `default` are supported +#[derive(Default, ForyObject)] +enum Command { + #[default] + Noop, + Execute { name: String, args: i32, env: String }, // Added 'env' + Cancel { reason: String }, // New variant +} + +// V1→V2: Missing 'env' gets default ""; Cancel→Noop fallback in V1 +// V2→V1: Extra 'env' skipped; Cancel→Noop fallback +``` + +### Tuple Schema Evolution + +Tuples (1-22 elements) now support length evolution in Compatible mode: + +- **Length changes**: Grow or shrink tuple size (missing elements get defaults, extras discarded) +- **Collections**: `Vec`, `HashMap`, `HashSet` elements fully supported +- **Nested tuples**: Multi-level nesting with independent evolution per level +- **Smart pointers**: `Option`, `Arc`, `Rc` wrapped elements handle evolution correctly +- **Struct fields**: Tuple fields in structs evolve independently + +```rust +let fory = Fory::default().compatible(true); + +// Serialize 2-element tuple +let short = (42i32, "hello".to_string()); +let bin = fory.serialize(&short).unwrap(); + +// Deserialize as 4-element tuple - extras get defaults +let long: (i32, String, f64, bool) = fory.deserialize(&bin).unwrap(); +assert_eq!(long, (42, "hello".to_string(), 0.0, false)); + +// Reverse: 4→2 elements, extras discarded +let long = (100i32, "world".to_string(), 3.14, true); +let bin = fory.serialize(&long).unwrap(); +let short: (i32, String) = fory.deserialize(&bin).unwrap(); +assert_eq!(short, (100, "world".to_string())); +``` + +## Features + +- feat(rust): add rust benchmark report script and result by @chaokunyang in https://github.com/apache/fory/pull/2835 +- feat(rust): rust benchmark print serialized data size by @chaokunyang in https://github.com/apache/fory/pull/2845 +- feat(rust): Support rust tagged union enum by @urlyy in https://github.com/apache/fory/pull/2855 +- feat(rust): support unsigned number for rust by @chaokunyang in https://github.com/apache/fory/pull/2857 +- feat(rust): support rust tuple serialization and schema evolution by @chaokunyang in https://github.com/apache/fory/pull/2858 +- feat(go): implement new field ordering and type hash algorithm by @ThisingL in https://github.com/apache/fory/pull/2868 +- feat: support fory skip macro attributes(#2864) by @kitty-eu-org in https://github.com/apache/fory/pull/2865 +- feat(Rust): Support usize by @urlyy in https://github.com/apache/fory/pull/2870 +- feat(rust): make whether write type/ref compile-time evaluation by @chaokunyang in https://github.com/apache/fory/pull/2871 +- feat(rust): add array support for rust by @chaokunyang in https://github.com/apache/fory/pull/2874 +- feat(rust): support enum variant for schema evolution mode by @chaokunyang in https://github.com/apache/fory/pull/2873 + +## Bug Fix + +- fix: fix 0.14.0 snapshot version by @chaokunyang in https://github.com/apache/fory/pull/2842 +- fix(java): setting the ForyJitCompilerThreadFactory to produce daemon threads by @coderunner234 in https://github.com/apache/fory/pull/2869 +- fix: modify the depth setting in Fory to prevent duplicate registrations. by @mengnankkkk in https://github.com/apache/fory/pull/2852 + +## Other Improvements + +- docs(rust): update rust benchmark report table by @chaokunyang in https://github.com/apache/fory/pull/2836 +- chore(rust): update cargo toml for publish by @chaokunyang in https://github.com/apache/fory/pull/2838 +- chore: bump release version to 0.13.0 by @chaokunyang in https://github.com/apache/fory/pull/2841 +- docs: fix doc sync dest by @chaokunyang in https://github.com/apache/fory/pull/2839 +- docs: refactor readme by @chaokunyang in https://github.com/apache/fory/pull/2843 +- docs: add AGENTS to readme by @chaokunyang in https://github.com/apache/fory/pull/2844 +- chore: remove agents from main readme by @chaokunyang in https://github.com/apache/fory/pull/2846 +- docs: update readme by @chaokunyang in https://github.com/apache/fory/pull/2847 +- docs: fix xlang type mapping link by @chaokunyang in https://github.com/apache/fory/pull/2848 +- chore(Java): Make RustXlangTest cases independent from each other by @urlyy in https://github.com/apache/fory/pull/2834 +- chore(java): Remove print property names by @Danden1 in https://github.com/apache/fory/pull/2860 +- chore(python): add py3.13 release flag by @chaokunyang in https://github.com/apache/fory/pull/2872 +- chore(rust): add tests to use #[derive(ForyObject)] in macro_rules! by @REASY in https://github.com/apache/fory/pull/2867 + +## New Contributors + +- @Danden1 made their first contribution in https://github.com/apache/fory/pull/2860 +- @coderunner234 made their first contribution in https://github.com/apache/fory/pull/2869 +- @REASY made their first contribution in https://github.com/apache/fory/pull/2867 + +**Full Changelog**: https://github.com/apache/fory/compare/v0.13.0...v0.13.1 --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
