Company
Date Published
Author
Alexey Milovidov
Word count
2784
Language
English
Hacker News points
124

Summary

Rust has been successfully integrated into the ClickHouse codebase, allowing for the development of new system components in Rust. The integration was done by rewriting some parts of the existing C++ code to use Rust and adding a few small Rust libraries initially. The first library added was the BLAKE3 hash function, which is implemented only in Rust at that time. After that, PRQL, another query language alternative to SQL, was integrated into ClickHouse. Delta Lake, an open data lake format from Databricks, was also integrated using a Rust library. The integration faced several challenges, including supply chain issues, complex wrappers for Rust and C++ interop, panics in Rust, sanitizers, cross-compilation, library linking, symbol sizes, composability, build profiling and caching, and dependency management. Despite these challenges, the integration was successful, and ClickHouse now has a growing community of Rust developers contributing to it.