qjournal
Cross-platform, native Rust implementation of the systemd-journald binary journal format.
Read and write .journal files fully compatible with
journalctl --file=<path>, without depending on libsystemd.
Features
- Write journal entries with arbitrary fields
- Read entries back, iterate, or query by field value
- Zstd compression support (enabled by default)
- Compatible with keyed-hash and compact journal formats
- No C dependencies — pure Rust with safe memory-mapped I/O
Usage
Add to your Cargo.toml:
[]
= "0.1"
Writing
use JournalWriter;
use Path;
let mut writer = open?;
writer.append_entry?;
writer.flush?;
Reading
use JournalReader;
use Path;
let reader = open?;
for entry in reader.entries
Querying by field
let errors = reader.entries_for_field?;
for e in &errors
Verify output with systemd tooling:
Feature flags
| Flag | Default | Description |
|---|---|---|
zstd-compression |
yes | Enable zstd compression |
License
Licensed under the GNU Lesser General Public License v2.1 or later.
SPDX-License-Identifier: LGPL-2.1-or-later