This is an automated email from the ASF dual-hosted git repository. pandalee pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/fury.git
The following commit(s) were added to refs/heads/main by this push: new dd3edef1 feat: add Dart to Language enums across all implementations (#2187) dd3edef1 is described below commit dd3edef18cf986d225600e0669d1cebd2fb0c8d7 Author: LouShaokun <lsk...@163.com> AuthorDate: Thu Apr 24 22:17:11 2025 +0800 feat: add Dart to Language enums across all implementations (#2187) <!-- **Thanks for contributing to Fury.** **If this is your first time opening a PR on Fury, you can refer to [CONTRIBUTING.md](https://github.com/apache/fury/blob/main/CONTRIBUTING.md).** Contribution Checklist - The **Apache Fury (incubating)** community has restrictions on the naming of PR titles. You can also find instructions in [CONTRIBUTING.md](https://github.com/apache/fury/blob/main/CONTRIBUTING.md). - Fury 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. --> ## What does this PR do? This PR adds Dart as a recognized language across all Fury language implementations. It modifies the Language enums/constants in Java, Python, Go, JavaScript, Rust, and Dart codebases to include Dart as a peer language. ## Related issues <!-- Is there any related issue? Please attach here. - #xxxx0 - #xxxx1 - #xxxx2 --> ## Does this PR introduce any user-facing change? - [ ] 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 benchmark data here. --> --- dart/packages/fury/lib/src/const/lang.dart | 22 +++++++++++----------- .../lib/src/serializer/fury_header_serializer.dart | 2 +- go/fury/fury.go | 1 + .../main/java/org/apache/fury/config/Language.java | 1 + javascript/packages/fury/lib/type.ts | 1 + python/pyfury/_fury.py | 1 + rust/fury-core/src/types.rs | 1 + .../serializer/scala/ToFactorySerializers.java | 2 -- 8 files changed, 17 insertions(+), 14 deletions(-) diff --git a/dart/packages/fury/lib/src/const/lang.dart b/dart/packages/fury/lib/src/const/lang.dart index a901328e..3e583a3c 100644 --- a/dart/packages/fury/lib/src/const/lang.dart +++ b/dart/packages/fury/lib/src/const/lang.dart @@ -19,15 +19,15 @@ /// Language supported by fury. enum Language{ - XLANG, - JAVA, - PYTHON, - CPP, - GO, - JAVASCRIPT, - RUST, - DART; + xlang, + java, + python, + cpp, + go, + javascript, + rust, + dart; - static int get peerLangBeginIndex => Language.JAVA.index; - static int get peerLangEndIndex => Language.DART.index; -} \ No newline at end of file + static int get peerLangBeginIndex => Language.java.index; + static int get peerLangEndIndex => Language.dart.index; +} diff --git a/dart/packages/fury/lib/src/serializer/fury_header_serializer.dart b/dart/packages/fury/lib/src/serializer/fury_header_serializer.dart index 57816b6d..2509cae2 100644 --- a/dart/packages/fury/lib/src/serializer/fury_header_serializer.dart +++ b/dart/packages/fury/lib/src/serializer/fury_header_serializer.dart @@ -85,7 +85,7 @@ final class FuryHeaderSerializer { } // callback must be null bd.writeInt8(bitmap); - bd.writeInt8(Language.JAVA.index); + bd.writeInt8(Language.dart.index); // Next is xWriteRef, handed over to the outside } } diff --git a/go/fury/fury.go b/go/fury/fury.go index 099dcd99..3af78dbc 100644 --- a/go/fury/fury.go +++ b/go/fury/fury.go @@ -84,6 +84,7 @@ const ( GO JAVASCRIPT RUST + DART ) const ( diff --git a/java/fury-core/src/main/java/org/apache/fury/config/Language.java b/java/fury-core/src/main/java/org/apache/fury/config/Language.java index 661df39d..45db3936 100644 --- a/java/fury-core/src/main/java/org/apache/fury/config/Language.java +++ b/java/fury-core/src/main/java/org/apache/fury/config/Language.java @@ -28,4 +28,5 @@ public enum Language { GO, JAVASCRIPT, RUST, + DART, } diff --git a/javascript/packages/fury/lib/type.ts b/javascript/packages/fury/lib/type.ts index 01d7e7ac..9fe1d268 100644 --- a/javascript/packages/fury/lib/type.ts +++ b/javascript/packages/fury/lib/type.ts @@ -219,6 +219,7 @@ export enum Language { GO = 4, JAVASCRIPT = 5, RUST = 6, + DART = 7, } export const MAGIC_NUMBER = 0x62D4; diff --git a/python/pyfury/_fury.py b/python/pyfury/_fury.py index c87067d7..e6ed07e6 100644 --- a/python/pyfury/_fury.py +++ b/python/pyfury/_fury.py @@ -71,6 +71,7 @@ class Language(enum.Enum): GO = 4 JAVA_SCRIPT = 5 RUST = 6 + DART = 7 class BufferObject(ABC): diff --git a/rust/fury-core/src/types.rs b/rust/fury-core/src/types.rs index 29a7e441..c9805d39 100644 --- a/rust/fury-core/src/types.rs +++ b/rust/fury-core/src/types.rs @@ -141,6 +141,7 @@ pub enum Language { Go = 4, Javascript = 5, Rust = 6, + Dart = 7, } #[derive(PartialEq)] diff --git a/scala/src/main/java/org/apache/fury/serializer/scala/ToFactorySerializers.java b/scala/src/main/java/org/apache/fury/serializer/scala/ToFactorySerializers.java index a800b98a..199a4c1a 100644 --- a/scala/src/main/java/org/apache/fury/serializer/scala/ToFactorySerializers.java +++ b/scala/src/main/java/org/apache/fury/serializer/scala/ToFactorySerializers.java @@ -92,6 +92,4 @@ public class ToFactorySerializers { return o; } } - - } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@fury.apache.org For additional commands, e-mail: commits-h...@fury.apache.org