Home / Companies / QuestDB / Blog / Post Details
Content Deep Dive

Combine Java and Rust Code Coverage in a Polyglot Project

Blog post from QuestDB

Post Details
Company
Date Published
Author
Marko Topolnik
Word Count
2,052
Language
English
Hacker News Points
-
Summary

QuestDB, an open-source time-series database, integrates Rust into its Java-first codebase to enhance performance for demanding workloads, such as trading and mission control. This integration, facilitated by Rust's compatibility with Java's zero garbage approach and native heap allocation, necessitates complex testing setups. The process involves running both Rust and Java tests, recording their code coverage, and merging these into a unified report. The blog details how to configure continuous integration (CI) builds to achieve this, using tools like LLVM, JaCoCo, and a custom Maven plugin for Rust. The approach allows QuestDB to maintain high test coverage standards across pull requests by focusing on lines altered by new code and enforcing a threshold for coverage. This setup reflects the growing popularity of Rust and its seamless integration capabilities with established languages like Java, supported by modern toolchains and CI pipelines.