#metadata #exif #xmp #photo #iptc


This library provides a Rust wrapper around the gexiv2 library, which is a GObject-based wrapper around the Exiv2 library, which provides read and write access to the Exif, XMP, and IPTC metadata in media files (typically photos) in various formats

21 releases

0.10.0 Jan 21, 2023
0.9.1 Jul 12, 2020
0.9.0 Nov 23, 2019
0.7.0 Nov 25, 2018
0.2.1 Mar 3, 2015

#100 in Images

Download history 210/week @ 2023-08-06 199/week @ 2023-08-13 108/week @ 2023-08-20 162/week @ 2023-08-27 184/week @ 2023-09-03 220/week @ 2023-09-10 161/week @ 2023-09-17 115/week @ 2023-09-24 286/week @ 2023-10-01 259/week @ 2023-10-08 262/week @ 2023-10-15 197/week @ 2023-10-22 219/week @ 2023-10-29 244/week @ 2023-11-05 138/week @ 2023-11-12 163/week @ 2023-11-19

789 downloads per month
Used in 3 crates


769 lines


docs-badge  build-badge  coverage-badge  downloads-badge  version-badge  license-badge  reuse-badge  best-practices-badge 

Rust library for working with media file metadata

This crate provides a Rust wrapper around the gexiv2 library, which is a GObject-based wrapper around Exiv2, which provides read and write access to the Exif, XMP, and IPTC metadata in media files (typically photos) in various formats.


API documentation is available online.

Exiv2’s homepage has documentation on available namespaces and tags.

gexiv2’s APIs may also be a useful reference, along with Exiv2’s API docs.

During development and testing, the Exiv2 command-line utility may come in handy.

Setup & Dependencies

rexiv2 requires Rust 1.63 or newer, and uses the 2021 edition of the language.

Being a wrapper for gexiv2 and Exiv2, rexiv2 obviously depends on them. These libraries are not bundled with rexiv2: you will need to install them separately.

gexiv2 is supported from version 0.10 onwards, and Exiv2 from version 0.23.

For full instructions on how to get started with rexiv2, including how to install the prerequisite dependencies, refer to the SETUP file.

Note that if you want BMFF support (e.g. HEIC, HEIF, AVIF, CR3, JXL/bmff files) you will need an up-to-date version of the underlying libraries (at least gexiv2 v0.13.0 and Exiv2 v0.27.4). You will also need to ensure that your version of Exiv2 has BMFF support enabled. This is generally enabled by default, but may be switched off in certain distributions due to licensing issues.

Versioning & History

rexiv2 is currently available as a pre-1.0 development version.

Version numbers follow the principles of Semantic Versioning.

No further breaking API changes are planned, but they are possible as a result of feedback on the API as more users try it out. Such feedback is welcome, and having the API tried out in real applications is part of ensuring it’s ready for a 1.0 release.

See the CHANGELOG file for a history of released versions.

Optional Features

raw-tag-access: If you need access to the raw byte values of tags, you can enable this feature and gain the get_tag_raw function.

This feature is disabled by default because it introduces a new dependency on glib-sys, and consequently on the GLib system library.

Contributions & Bug Reports

Contributions are gladly accepted, either through GitHub pull requests or by mailing patches to felixc@felixcrux.com (PGP key 8569B6311EE485F8).

By contributing, you are agreeing to make your contribution available under the same license terms as the rest of the project.

Bug reports and feature requests can also be sent through GitHub Issues or by email, and are very welcome and appreciated.

Reports of security issues can also be sent privately to the email address and PGP key given above.

For more information, see the CONTRIBUTING file.

The Exiv2 and gexiv2 libraries are both released under the terms of the GNU General Public License (GPL), and since rexiv2 is linked to them, it too is made available under the terms of the GPL. Specifically:

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Please refer to the LICENSE file for a full copy of the license.


~10K SLoC