From e9a06bb9a2802a5ae6011fcd96cf54e1cfc7d311 Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Sun, 20 Sep 2020 05:01:06 +0200 Subject: Derive Default for libnitrokey structs This patch adds the --with-derive-default option to the bindgen invocation so that it derives Default implementations for all libnitrokey structs. This allows us to simplify code in nitrokey-rs, for example the initialization of structs that are used in nitrokey-sys functions with output parameters. --- Makefile | 1 + 1 file changed, 1 insertion(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index bf47813..9d04632 100644 --- a/Makefile +++ b/Makefile @@ -7,6 +7,7 @@ src/ffi.rs: ${LIBNITROKEY}/NK_C_API.h --whitelist-function "NK_.*" \ --whitelist-var "NK_.*" \ --whitelist-var "MAXIMUM_STR_REPLY_LENGTH" \ + --with-derive-default \ --output "$@" \ "$<" \ -- "-I${LIBNITROKEY}/libnitrokey" -- cgit v1.2.3