Multi-Crate Tag Database Architecture
Overview
The OxiDex tag database is split into 6 domain-specific crates for faster compilation:
exiftool-tags-core- Universal standards (EXIF, XMP, IPTC, GPS)exiftool-tags-camera- Camera manufacturers (Canon, Nikon, Sony, etc.)exiftool-tags-media- Audio/video formats (QuickTime, FLAC, MPEG)exiftool-tags-image- Image formats (PNG, GIF, JPEG2000)exiftool-tags-document- Document formats (PDF, fonts, archives)exiftool-tags-specialty- Medical/scientific (DICOM, FITS, MRC)exiftool-tags- Facade crate re-exporting everything
Data Format
Tags are stored as YAML files embedded at compile time and parsed lazily:
yaml
tables:
- name: Canon
tags:
- id: "0x0001"
name: CanonCameraSettings
writable: true
type: int16u
description: "Camera settings"1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
Build Process
build.rsdownloads ExifTool Perl source- Parses tag definitions from Perl modules
- Routes tags to appropriate domain based on table name
- Generates compact YAML files (not Rust code)
- Each crate embeds YAML with
include_str!() - Runtime lazy parsing on first access
Performance
- Build time: 3-5x faster vs monolithic crate
- Parallelization: 6 crates compile simultaneously
- Incremental: Changes to main code don't trigger tag recompilation
- Runtime overhead: <10ms one-time YAML parsing
API Compatibility
The facade crate maintains full API compatibility:
rust
use exiftool_tags::*;
// Global search across all domains
let table = get_tag_table("Canon");
// Domain-specific access
let canon = camera::get_tag_table("Canon");1
2
3
4
5
6
7
2
3
4
5
6
7