Skip to content
/ tkrzw Public

Java 8+ distribution (along with native libs) of the Tkrzw key value embedded database

Notifications You must be signed in to change notification settings

fizzed/tkrzw

Repository files navigation

Java distribution of Tkrzw & JNI libs by Fizzed

Maven Central

Java 8 Java 11 Java 17 Java 21

Linux x64 Linux arm64 Linux armhf Linux armel Linux riscv64 Linux MUSL x64 Linux MUSL arm64 MacOS x64 MacOS arm64 Windows x64 Windows arm64

Overview

This is a published version of the Tkrzw library for Java 8+, along with native libs that are automatically extracted at runtime.

The Java library is as unmodified as possible from the original Tkrzw, but a few changes were made to automatically extract the library at runtime, along with much improved double locking to prevent the library from being loaded multiple times.

Linux x64 native libs are compiled on Ubuntu 18.04, so you can be assured they'll work well on various flavors of linux going back several years in time.

Sponsorship & Support

Project by Fizzed, Inc. (Follow on Twitter: @fizzed_inc)

Developing and maintaining opensource projects requires significant time. If you find this project useful or need commercial support, we'd love to chat. Drop us an email at ping@fizzed.com

Project sponsors may include the following benefits:

  • Priority support (outside of Github)
  • Feature development & roadmap
  • Priority bug fixes
  • Privately hosted continuous integration tests for their unique edge or use cases

Usage

Add the following to your maven POM file for Linux x64

<dependency>
  <groupId>com.fizzed</groupId>
  <artifactId>tkrzw-linux-x64</artifactId>
  <version>VERSION-HERE</version>
</dependency>

Or MacOS arm64 (Apple silicon)

<dependency>
  <groupId>com.fizzed</groupId>
  <artifactId>tkrzw-macos-arm64</artifactId>
  <version>VERSION-HERE</version>
</dependency>

Or for all operating system & arches

<dependency>
  <groupId>com.fizzed</groupId>
  <artifactId>tkrzw-all-natives</artifactId>
  <version>VERSION-HERE</version>
</dependency>

To simplify versions, you may optionally want to import our BOM (bill of materials)

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>com.fizzed</groupId>
            <artifactId>tkrzw-bom</artifactId>
            <version>VERSION-HERE</version>
            <scope>import</scope>
            <type>pom</type>
        </dependency>
    </dependencies>
</dependencyManagement>

In your java code you can use the Tkrzw api as documented here

Native Libs

zlib is enabled, zstd/lzma/lz4 are not enabled since those dependencies are not very common in many environments and would prevent the library from loading in Java.

Zip libraries must be installed for this version to run. You must also install libstdc++.

 sudo apt install zlib1g          # e.g. on ubuntu/debian
 sudo apk add zlib                # e.g. on alpine
OS Arch Artifact Info
Linux x64 tkrzw-linux-x64 built on ubuntu 18.04, glibc 2.27
Linux arm64 tkrzw-linux-arm64 built on ubuntu 18.04, glibc 2.27
Linux armhf tkrzw-linux-armhf built on ubuntu 18.04, glibc 2.27
Linux armel tkrzw-linux-armel built on ubuntu 18.04, glibc 2.27
Linux MUSL x64 tkrzw-linux_musl-x64 built on alpine 3.11
Linux MUSL arm64 tkrzw-linux_musl-arm64 built on alpine 3.11
Linux riscv64 tkrzw-linux-riscv64 built on ubuntu 20.04, glibc 2.31
MacOS x64 tkrzw-macos-x64 built on macos 10.13 high sierra
MacOS arm64 tkrzw-macos-arm64 built on macos 12 monterey
Windows x64 tkrzw-windows-x64 targets win 7+
Windows arm64 tkrzw-windows-arm64 tested on win 10+

Development

We use a simple, yet quite sophisticated build system for fast, local builds across operating system and architectures. To build and test locally, you can leverage our Blaze build system

 java -jar blaze.jar build_natives
 java -jar blaze.jar test

For cross compiling and testing, we leverage Buildx as a plugin to our Blaze script. For linux targets, we leverage docker containers either running locally on an x86_64 host, or remotely on dedicated build machines running on arm64, macos x64, and macos arm64. To build containers, you'll want to edit .blaze/blaze.java and comment out/edit which platforms you'd like to build for, or potentially change them running on a remote machine via SSH. Once you're happy with what you want to build for:

java -jar blaze.jar cross_build_containers

Or

java -jar blaze.jar cross_build_containers --targets linux-x64

Then

java -jar blaze.jar cross_build_natives --targets linux-x64
java -jar blaze.jar cross_tests --targets linux-x64

For information on registering your x86_64 host to run other architectures (e.g. riscv64 or aarch64), please see the readme for https://github.com/fizzed/buildx

License

Copyright (C) 2020+ Fizzed, Inc.

This work is licensed under the Apache License, Version 2.0. See LICENSE for details.

About

Java 8+ distribution (along with native libs) of the Tkrzw key value embedded database

Resources

Stars

Watchers

Forks

Packages

No packages published