Skip to content

v0.9.0

Latest
Compare
Choose a tag to compare
@chaokunyang chaokunyang released this 10 Nov 06:54
· 21 commits to main since this release

Highlight

  • Optimized serializers for Fury kotlin support
  • Highly-optimized UTF-8 string encoding implementation for Java(2x faster than JDK utf8 encoding)
  • Reduce metastring hashcode payload for small string(<=16 bytes)
  • Support building C++ libs on windows platform

How to use Fury kotlin

Install:

<dependency>
  <groupId>org.apache.fury</groupId>
  <artifactId>fury-kotlin</artifactId>
  <version>0.9.0</version>
</dependency>

Usage:

import org.apache.fury.Fury
import org.apache.fury.ThreadSafeFury
import org.apache.fury.serializer.kotlin.KotlinSerializers

data class Person(val name: String, val id: Long, val github: String)
data class Point(val x : Int, val y : Int, val z : Int)

fun main(args: Array<String>) {
    // Note: following fury init code should be executed only once in a global scope instead
    // of initializing it everytime when serialization.
    val fury: ThreadSafeFury = Fury.builder().requireClassRegistration(true).buildThreadSafeFury()
    KotlinSerializers.registerSerializers(fury)
    fury.register(Person::class.java)
    fury.register(Point::class.java)

    val p = Person("Shawn Yang", 1, "https://github.com/chaokunyang")
    println(fury.deserialize(fury.serialize(p)))
    println(fury.deserialize(fury.serialize(Point(1, 2, 3))))
}

Features

  • feat(kotlin): Introduce kotlin package with stdlib collections and tests by @wywen in #1877
  • feat(kotlin): Add Unsigned Primitive Support by @wywen in #1886
  • feat(kotlin): Add unsigned array support and tests for arrays and strings by @wywen in #1891
  • feat(java): Refactor String serialization and deserialization by @HuangXingBo in #1890
  • feat(java): support thread safe register callback for scala kotlin by @chaokunyang in #1895
  • feat(scala): add scala range serializer by @chaokunyang in #1899
  • feat(java): add option to treat enum as string by @orisgarno in #1892
  • feat(kotlin): Add tests and support for built-in types from the kotlin stdlib by @wywen in #1901
  • feat(java): reduce metastring hashcode payload for small string(<=16 bytes) by @chaokunyang in #1909
  • feat(javascript): Added serialization and serialization for Type Meta Layer by @Forchapeatl in #1825
  • feat(bazel): support building C++ libs on windows platform by @An-DJ in #1873
  • feat(scala): support scala native image build by @chaokunyang in #1922
  • perf(python): Add python benchmark test by @penguin-wwy in #1916

Bug Fix

  • fix(scala): ban these sbt commands by @pjfanning in #1862
  • fix(java): fix async compilation switch for non-public nested class by @chaokunyang in #1883
  • fix(java): fix add fury thread safety issue by @chaokunyang in #1889
  • fix(other): fix feature request template by @chaokunyang in #1898
  • fix(java): NonExistentEnum on mode serializeEnumByName by @orisgarno in #1904
  • fix(java): ThreadLocalFury and ThreadPoolFury prioritize using the user classloader by @Aliothmoon in #1907
  • fix(java): child container deep copy by @zhaommmmomo in #1911
  • fix(java): Fix incorrect results of utf16 to utf8 conversion for latin1 but not ascii characters in #1914
  • fix(python): Eliminate PytestCollectionWarning when running pytest by @penguin-wwy in #1917

Other Improvements

  • chore(py314): Replace deprecated pkgutil.find_loader by @effigies in #1888
  • docs(guide): Fix package typo by @mandrean in #1906
  • build(kotlin): Add spotless ktfmt and enable explicit api mode for library code. by @wywen in #1912
  • build(deps): upgrade scala (2.13.15/3.3.4) by @pjfanning in #1861
  • feat(rust): add rust-analyzer to toolchain by @caicancai in #1865
  • chore(scala): add scala build script by @chaokunyang in #1920
  • chore(kotlin): add parent pom for fury kotlin by @chaokunyang in #1921
  • feat(java): Improve error message on architecture not using little-endian format by @apupier in #1918

New Contributors

Full Changelog: v0.8.0...v0.9.0