Currently `libsqlite3-sys` is the first result for both the "database"
keyword, and the "Database interfaces" category. This makes sense, as it
is a dependency of both Diesel and rusqlite. However, this library is
not intended to be used directly. While it can technically be called a
database interface, FFI is clearly the category that applies more than
anything else. Someone browsing this keyword or category is likely
looking for a Rust library they can use, not a C one.
This also required adjusting the fixup inserting `SQLITE_DETERMINISTIC` into the
bindings if it was missing. Now that `bindgen` uses the `quote` crate for code
generation, instead of `syntex`, we can't rely on the output being formatted (it
only is formatted if there is a usable `rustfmt` on the `$PATH`). Even better
than this `contains` tweak would be switching to regexps or something.
Despite that formatting hiccup, newer `bindgen` releases are more reliable due
to many bug fixes, and also build in approximately half the time that older
`bindgen` versions do.
This minor version includes some internal rearranging of constants that
should not affect the public interface, and additions to the build
system that allow the use of vcpkg on Windows.
Recent versions of bindgen use `std::os::raw` over `libc`, but currently
`libsqlite3-sys` is overriding that. `std::os::raw` is a subset of
`libc` that exports only the relevant type definitions, but not any
functions which require additional linking. This enables
`libsqlite3-sys` to be more easily used on targets that may not have a
libc available (presumably sqlite itself would have been compiled with
musl in that case)
See comment in libsqlite3-sys/build.rs for details - adding this flag is
harmless if it's not present in the header, and not having it can break
builds against older SQLite versions.
Added manually to the bindgens a type entry for 'Struct_sqlite3' pointing to sqlite3 to prevent changing multiple files.
Reran bindgens as:
bindgen --builtins --link=sqlite3 --output=./libsqlite3-sys/src/bindgen.rs ./libsqlite3-sys/sqlite3/sqlite3.h