Bindgen and optional (nullable) fields

Hi! I'm trying to write Rust bindings for EJDB, which is essentially a C library.

This database is configured with structures that have optional fields like:

typedef struct _EJDB_OPTS {
  IWKV_OPTS kv;                 /**< IWKV storage options. @see iwkv.h */
  EJDB_HTTP http;               /**< HTTP/Websocket server options */
  bool no_wal;                  /**< Do not use write-ahead-log. Default: false */
  uint32_t sort_buffer_sz;      /**< Max sorting buffer size. If exceeded an overflow temp file for sorted data will created.
                                     Default 16Mb, min: 1Mb */
  uint32_t document_buffer_sz;  /**< Initial size of buffer to process/store document during select.
                                     Default 64Kb, min: 16Kb */
} EJDB_OPTS;

So, I can pass sort_buffer_sz as null and it will get default value.

Of course, Bindgen knows nothing about it, and in generated code I get:

pub struct _EJDB_OPTS {
    #[doc = "< IWKV storage options. @see iwkv.h"]
    pub kv: IWKV_OPTS,
    #[doc = "< HTTP/Websocket server options"]
    pub http: EJDB_HTTP,
    #[doc = "< Do not use write-ahead-log. Default: false"]
    pub no_wal: bool,
    #[doc = "< Max sorting buffer size. If exceeded an overflow temp file for sorted data will created."]
    #[doc = "Default 16Mb, min: 1Mb"]
    pub sort_buffer_sz: u32,
    #[doc = "< Initial size of buffer to process/store document during select."]
    #[doc = "Default 64Kb, min: 16Kb"]
    pub document_buffer_sz: u32,
}

As you can see, sort_buffer_sz is not optional.
How can I make it to be so?

Also, I'm looking for a good example of async database API. If you know one, please point me to it!

null is zero in the C world, so make it zero?

Really? Didn't know that, I'll try!
And what about booleans?

Sorry, I'm from "high-level" world and know almost nothing about all this stuff. Trying to figure it out.

false is also specified by the C language to be an integer of value 0. (bool is an alias provided by the standard library for the primitive type _Bool, which is defined as an integer type that is at least large enough to hold the values 0 and 1 for false and true). It is a macro defined in <stdbool.h>:

https://en.cppreference.com/w/c/types/boolean