Skip to content

Dependencies

David Lazarescu edited this page Jun 25, 2025 · 15 revisions

Let's start off by looking into the Dependencies of Librum!

While Librum tries to have as few dependencies as possible, we can't reinvent the wheel, so depend on the following four necessary libraries:

  • Qt6
  • mupdf
  • rapidfuzz-cpp
  • boost-ext::di
  • googletest

All dependencies (except Qt6) are build from source (see libs folder) as shared Libraries and linked directly into the application to avoid any cross platform compatibility issues.


Let's take a closer look at each dependency to see what they are for!

Qt6

Qt6 is a comprehensive application framework that plays a central role in Librum. It's used throughout the entire codebase to simplify development and provide powerful tools. Some of the key areas where Librum relies on Qt6 include:

  • Graphical User Interface (GUI) – Qt powers the entire UI using QML, enabling flexible, modern, and responsive interfaces.
  • Rich data types – Qt provides higher-level, convenient abstractions like QString, QDateTime, and more, making data handling easier and safer.
  • Signals and slots – Qt's built-in mechanism for communication between classes enables clean, decoupled interactions across different parts of the app.

Whether it's rendering the interface or wiring up internal logic, Qt6 is everywhere in Librum.


boost-ext::di

Librum uses dependency injection to create a more testable and loosely coupled system. To achieve this, it relies on the boost-ext::di library. This library simplifies the construction and management of dependencies, making the injection process much easier and more maintainable.

This library is only used in the dependency injection and main files.


rapidfuzz-cpp

To enable sorting libraries of books based on query strings, Librum uses rapidfuzz-cpp. This library offers an easy-to-use interface for calculating Levenshtein distances, which Librum leverages to rank and sort books by similarity, also known as fuzzy searching.


mupdf

At the heart of Librum lies mupdf, a fast and cross-platform rendering library. Librum relies on mupdf to render, edit and transform pages, making it possible to display books smoothly and efficiently across different platforms.

All the access to mupdf happens in the application layer (see Librum's Architecture on the next page).


googletest

A simple testing framework, Librum uses googletest (and googlemock) for creating unit tests across the code base.


➡️ Next: 🏗️ The Architecture

Clone this wiki locally