aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorRobin Krahl <me@robin-krahl.de>2020-09-20 05:01:06 +0200
committerRobin Krahl <robin.krahl@ireas.org>2020-09-20 11:50:05 +0200
commite9a06bb9a2802a5ae6011fcd96cf54e1cfc7d311 (patch)
treebac0eab277ac64d6960dd433b7603393bbab2561 /Makefile
parent483ec7256d6c4d01ba6c41513fdf8bbd7df6b4b3 (diff)
downloadnitrokey-sys-rs-e9a06bb9a2802a5ae6011fcd96cf54e1cfc7d311.tar.gz
nitrokey-sys-rs-e9a06bb9a2802a5ae6011fcd96cf54e1cfc7d311.tar.bz2
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.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile1
1 files changed, 1 insertions, 0 deletions
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"