Skip to content

Your tachograph files.
Ready for your code.

Turn a digital tachograph download into strongly typed Rust data. Parse cards and vehicle units, export records and verify supported signatures in your own application.

Rust library · Command-line tools · WebAssembly

From a file to typed dataRust
use esm_parser::parse_from_file;

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let data = parse_from_file("card.ddd")?;
    println!("{data:#?}");
    Ok(())
}
Actual public API. Supply your own local DDD file.
Digital tachograph downloads

.DDD → Rust types · JSON · XML

Gen1 · Gen2 · Cards · Vehicle units

From binary records
to useful building blocks.

Keep parsing in one library. Use the decoded records in your own tools, services or browser-based application.

Detect and parse

Automatically identify Gen1 or Gen2 and card or vehicle-unit data. Read from a file path or an in-memory byte slice.

Work with typed records

Access activities, events, faults, vehicle usage and calibration data through structured Rust types and generation-specific modules.

Export JSON and XML

Use the included esm2json and esm2xml command-line examples. Choose an output path and optional pretty formatting.

Verify supported signatures

Check Gen1 and Gen2 card and vehicle-unit signatures with the corresponding ERCA certificate material. Verification scope stays explicit.

Build for the browser

Compile with wasm-pack. The WebAssembly boundary includes a generated TypeScript contract and a discriminated kind/data envelope.

Build on open source

Read the implementation, extend the parser and integrate it under the project license. ESM Viewer is a separate desktop application for inspecting downloads.

Parsing and signature verification do not calculate driving-time compliance or provide a certified legal assessment.

Choose your entry point.

A library for integration, examples for conversion, and a WebAssembly build for browser projects.

Export from the command line

Run the JSON example from a source checkout. Use esm2xml and --xml-file for XML output.

cargo run --example esm2json -- \
  --ddd-file card.ddd \
  --json-file card.json \
  --pretty
CLI options and examples →

Verify after parsing

Load the ERCA certificates for the generations you need, then verify the parsed data.

let data = parse_from_file("vehicle_unit.ddd")?;
let gen1 = std::fs::read("gen1-erca.bin")?;
let gen2 = std::fs::read("gen2-erca.bin")?;
let result = data.verify(
    Some(&gen1), Some(&gen2),
)?;
Verification contract and limitations →

Your file. Parsed here.

Try the actual Rust parser compiled to WebAssembly. Your file is processed in this browser, not uploaded to a server.

Open the full-page demo →

A dedicated workspace with drag-and-drop, JSON preview and download. No upload needed. Parsing does not verify digital signatures.

Your files.
Your environment.

The library parses data in the application that calls it. The command-line examples work with local files; no hosted upload service is needed.

DDD downloads can contain personal driver and vehicle information. Keep production files and certificate material out of public repositories, screenshots and support reports.

Local DDD download
Your input file or byte slice

ESM Parser
Decode and optionally verify

Your application
Typed records or exported data

Download a release.

Prebuilt command-line examples and a WebAssembly package. For the Rust library, build from source below.

Latest stable archives: v0.4.1 release notes.

These are developer tools, not desktop installers. Release contents can differ from the current source; read the linked release notes.

Build and run locally.

Use a current stable Rust toolchain. There is no published minimum supported Rust version policy.

git clone https://github.com/mbolaric/esm-parser.git
cd esm-parser
cargo build
Use the prebuilt command-line examples

Extract the archive for your platform. Open a terminal in the extracted directory and run ./esm2json --help or ./esm2xml --help. On Windows, use .\esm2json.exe --help. If an extracted Unix executable lacks permission, run chmod +x esm2json esm2xml. Only run binaries from a source you trust.

Compile the WebAssembly demo

Try the full-page demo, or build the standalone example locally. From the repository root, install wasm-pack and run the build script. It regenerates the TypeScript contract before building the browser package.

cargo install wasm-pack
./scripts/build-wasm.sh --release
python3 -m http.server 8090

Open http://127.0.0.1:8090/examples/web/. Serve the repository root, not examples/web: the standalone example loads the generated pkg directory. The full-page demo loads the parser only after you select a file.

Supply certificates for verification

A Gen1 ERCA value must be exactly 144 bytes; a Gen2 ERCA CVC must be exactly 205 bytes. Pass the corresponding --erca-gen1-file and --erca-gen2-file options to an exporter. Parsing alone does not verify signatures.

Company and Control Gen2 applications do not have a signed elementary-file verification path. Combined Driver and Workshop cards are verified separately by generation. See the full verification reference for certificate chains, rollover and supported scopes.

Practical questions.

Is this the same as ESM Viewer?

No. ESM Parser is a Rust parsing library with CLI examples and WebAssembly support. ESM Viewer is the separate desktop application for exploring tachograph records through a graphical interface.

Can I parse data already in memory?

Yes. Use parse_from_memory with a byte slice. Both it and parse_from_file return TachographData, distinguishing Gen1/Gen2 and card/vehicle-unit results.

How is the project licensed?

ESM Parser is open source. Review the project license before integrating or distributing it.

How should I report a parsing problem?

Open a GitHub issue with the version, command or API call, and a redacted error. Do not attach personal DDD downloads or certificate material. The fixture-backed integration tests are ignored by default so private files can stay local.