15 releases (9 breaking)

0.10.0 Aug 7, 2021
0.9.2 Dec 10, 2019
0.9.1 Sep 29, 2019
0.9.0 Jun 27, 2019
0.4.0 Jul 14, 2015

#115 in Cryptography

Download history 255/week @ 2022-06-07 569/week @ 2022-06-14 400/week @ 2022-06-21 417/week @ 2022-06-28 292/week @ 2022-07-05 343/week @ 2022-07-12 324/week @ 2022-07-19 298/week @ 2022-07-26 437/week @ 2022-08-02 450/week @ 2022-08-09 298/week @ 2022-08-16 321/week @ 2022-08-23 322/week @ 2022-08-30 365/week @ 2022-09-06 283/week @ 2022-09-13 187/week @ 2022-09-20

1,186 downloads per month
Used in 21 crates (15 directly)




Build Status crates.io version LGPL-2.1 licensed downloads

GPGME bindings for Rust.



These crates require the gpgme library and its development files (e.g., headers, gpgme-config) to be installed. The buildscript will attempt to detect the necessary information using the gpgme-config script distributed with gpgme. If for whatever reason this does not work, the required information can also be specified using one or more environment variables:

  • GPGME_INCLUDE specifies the path(s) where header files can be found.
  • GPGME_LIB_DIR specifies the path(s) where library files (e.g., *.so, *.a, *.dll, etc.) can be found.
  • GPGME_LIBS specifies the name(s) of all required libraries.
  • GPGME_STATIC controls whether libraries are linked to statically or dynamically by default. Individual libraries can have their linkage overridden by prefixing their names with either static= or dynamic= in GPGME_LIBS.
  • GPGME_CONFIG specifies the path to the gpgme-config script.

Each environment variable, with the exceptions of GPGME_STATIC and GPGME_CONFIG, can take multiple values separated by the platform's path separator.

NOTE: These crates also depend on the gpg-error crate which has its own requirements.

NOTE: Previous versions of these crates bundled the sources of the gpgme library and attempted to build them via the buildscript. This is no longer supported.


Some simple example programs based on those in the GPGME sources can be found in examples.

They can be run with cargo:

$ cargo run --example keylist --
keyid   : 89ABCDEF01234567
fpr     : 0123456789ABCDEF0123456789ABCDEF01234567
caps    : esc
flags   :
userid 0: Example <example@example.org>
valid  0: Unknown


~10K SLoC