Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 79 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,85 @@ cd java-questdb-client
mvn clean package -DskipTests
```

### Building Native Libraries

The client includes native libraries (C/C++ and assembly) for performance-critical operations. Pre-built binaries are included in the repository, but you can rebuild them locally if needed.

#### Prerequisites

| Tool | Version | Notes |
| -------------- | -------------------- | ----------------------------------- |
| CMake | 3.5+ | Build system generator |
| NASM | 2.14+ | Netwide Assembler for assembly code |
| C/C++ Compiler | GCC, Clang, or MinGW | C++17 support required |
| Make | Any | Build tool |
| JDK | 11+ | For JNI headers |

#### macOS (ARM64 or x86-64)

```bash
# Install build tools
brew install cmake nasm

# Set deployment target
export MACOSX_DEPLOYMENT_TARGET=13.0

# Build native library
cd core
cmake -B cmake-build-release -DCMAKE_BUILD_TYPE=Release
cmake --build cmake-build-release --config Release
```

#### Linux x86-64

```bash
# Install build tools (Debian/Ubuntu)
sudo apt-get install cmake nasm build-essential

# Build native library
cd core
cmake -DCMAKE_BUILD_TYPE=Release -B cmake-build-release -S.
cmake --build cmake-build-release --config Release
```

#### Linux ARM64

```bash
# Install build tools (Debian/Ubuntu)
sudo apt-get install cmake nasm build-essential

# Build using ARM64 toolchain
cd core
cmake -DCMAKE_TOOLCHAIN_FILE=./src/main/c/toolchains/linux-arm64.cmake \
-DCMAKE_BUILD_TYPE=Release -B cmake-build-release-arm64 -S.
cmake --build cmake-build-release-arm64 --config Release
```

#### Windows x86-64 (Cross-compilation from Linux)

```bash
# Install cross-compilation tools (Debian/Ubuntu)
sudo apt-get install cmake nasm gcc-mingw-w64 g++-mingw-w64

# Build using Windows toolchain
cd core
cmake -DCMAKE_TOOLCHAIN_FILE=./src/main/c/toolchains/windows-x86_64.cmake \
-DCMAKE_CROSSCOMPILING=True -DCMAKE_BUILD_TYPE=Release \
-B cmake-build-release-win64
cmake --build cmake-build-release-win64 --config Release
```

#### Native Library Output Locations

Built libraries are placed in the resources directory for each platform:

```
core/target/classes/io/questdb/client/bin-local/
├── libquestdb.dylib # macOS
├── libquestdb.so # Linux
└── libquestdb.dll # Windows
```

## Community

- [QuestDB Documentation](https://questdb.com/docs/)
Expand Down
10 changes: 5 additions & 5 deletions core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
<scm>
<url>scm:git:https://github.com/questdb/java-questdb-client.git</url>
<connection>scm:git:https://github.com/questdb/java-questdb-client.git</connection>
<tag>9.3.1</tag>
<tag>1.0.0</tag>
</scm>


Expand Down Expand Up @@ -377,10 +377,10 @@
</build>
</profile>
<profile>
<id>java17+</id>
<id>java11+</id>
<properties>
<jdk.version>17</jdk.version>
<java.enforce.version>17</java.enforce.version>
<jdk.version>11</jdk.version>
<java.enforce.version>11</java.enforce.version>
<questdb.artifactid>questdb</questdb.artifactid>
<compilerArg1>--add-exports</compilerArg1>
<compilerArg2>java.base/jdk.internal.math=io.questdb.client</compilerArg2>
Expand All @@ -390,7 +390,7 @@
<javac.compile.target>${javac.target}</javac.compile.target>
</properties>
<activation>
<jdk>(17,)</jdk>
<jdk>(11,)</jdk>
</activation>
<dependencies>
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<connection>scm:git:https://github.com/questdb/java-questdb-client.git</connection>
<developerConnection>scm:git:https://github.com/questdb/java-questdb-client.git</developerConnection>
<url>https://github.com/questdb/java-questdb-client</url>
<tag>9.3.1</tag>
<tag>1.0.0</tag>
</scm>

<build>
Expand Down