2019-03-23 19:28:40 +03:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
bindgen bindings.h -o src/lib.rs \
|
2019-03-24 21:08:14 +03:00
|
|
|
--no-layout-tests \
|
2019-03-23 19:28:40 +03:00
|
|
|
--no-doc-comments \
|
|
|
|
--blacklist-type "FT_(Int16|UInt16|Int32|UInt32|Int16|Int64|UInt64)" \
|
|
|
|
--raw-line "#![allow(non_snake_case)]" \
|
|
|
|
--raw-line "#![allow(non_camel_case_types)]" \
|
|
|
|
--raw-line "#![allow(non_upper_case_globals)]" \
|
2019-07-06 18:13:22 +03:00
|
|
|
--raw-line "#![allow(clippy::unreadable_literal)]" \
|
2021-03-25 20:05:34 +03:00
|
|
|
--raw-line "#![allow(clippy::upper_case_acronyms)]" \
|
2019-03-23 19:28:40 +03:00
|
|
|
--raw-line "pub type FT_Int16 = i16;" \
|
|
|
|
--raw-line "pub type FT_UInt16 = u16;" \
|
|
|
|
--raw-line "pub type FT_Int32 = i32;" \
|
|
|
|
--raw-line "pub type FT_UInt32 = u32;" \
|
2019-03-24 21:08:14 +03:00
|
|
|
--raw-line "pub type FT_Int64 = i64;" \
|
|
|
|
--raw-line "pub type FT_UInt64 = u64;" \
|
2019-03-23 19:28:40 +03:00
|
|
|
--default-enum-style rust \
|
|
|
|
--generate=functions,types,vars \
|
|
|
|
--whitelist-function="FT_.*" \
|
2021-04-08 06:00:41 +03:00
|
|
|
--whitelist-type="[FT]T_.*" \
|
2021-10-10 20:18:47 +03:00
|
|
|
--whitelist-var="[FT]T_.*" \
|
2019-03-23 19:28:40 +03:00
|
|
|
-- -Ifreetype2/include
|