dlt-rs
Safe and idiomatic Rust wrapper for the COVESA DLT (Diagnostic Log and Trace) library.
Overview
dlt-rs provides a safe, ergonomic Rust API for logging to the COVESA DLT daemon. It wraps the low-level dlt-sys FFI bindings with a type-safe interface.
Features
- ✅ Type-safe API - No unsafe code in your application
- ✅ Structured logging - Log typed fields (integers, floats, strings, etc.)
- ✅ RAII-based resource management - Automatic cleanup
- ✅ Thread-safe - Safe for concurrent use
- ✅ Zero-copy where possible for performance
- ✅ Dynamic log levels - Responds to DLT daemon configuration changes
Basic Example
use ;
Structured Logging
use ;
// Log structured data with typed fields
let mut writer = ctx.log_write_start?;
writer
.write_string?
.write_float32?
.write_string?;
writer.finish?;
Tracing Integration
For integration with the tracing ecosystem, see the tracing-dlt crate.
Features
trace_load_ctrl- Enable DLT load control support (optional)
License
Licensed under the Apache License, Version 2.0. See LICENSE for details.
Contributing
This project is part of Eclipse OpenSOVD, but can be used independently. See CONTRIBUTING.md for guidelines.