diff --git a/.gitmodules b/.gitmodules index 2691a76f..e946c61f 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,4 @@ -[submodule "lmdb-master3-sys/lmdb"] - path = lmdb-master3-sys/lmdb +[submodule "lmdb-master-sys/lmdb"] + path = lmdb-master-sys/lmdb url = https://github.com/LMDB/lmdb + branch = mdb.master diff --git a/Cargo.toml b/Cargo.toml index 1ea0bfb8..f88355d8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,2 +1,2 @@ [workspace] -members = ["lmdb-master3-sys", "heed", "heed-traits", "heed-types"] +members = ["lmdb-master-sys", "heed", "heed-traits", "heed-types"] diff --git a/heed/Cargo.toml b/heed/Cargo.toml index 600093b8..21179cae 100644 --- a/heed/Cargo.toml +++ b/heed/Cargo.toml @@ -16,7 +16,7 @@ byteorder = { version = "1.4.3", default-features = false } heed-traits = { version = "0.7.0", path = "../heed-traits" } heed-types = { version = "0.7.2", path = "../heed-types" } libc = "0.2.139" -lmdb-master3-sys = { version = "0.1.0", path = "../lmdb-master3-sys" } +lmdb-master-sys = { version = "0.1.0", path = "../lmdb-master-sys" } once_cell = "1.16.0" page_size = "0.5.0" serde = { version = "1.0.151", features = ["derive"], optional = true } @@ -36,7 +36,7 @@ url = "2.3.1" default = ["serde", "serde-bincode", "serde-json"] # Use the provided version of LMDB instead of the one that is installed on the system. -vendored = ["lmdb-master3-sys/vendored"] +vendored = ["lmdb-master-sys/vendored"] # The NO_TLS flag is automatically set on Env opening and # RoTxn implements the Sync trait. This allow the user to reference diff --git a/heed/src/mdb/lmdb_error.rs b/heed/src/mdb/lmdb_error.rs index 48734221..11674b2f 100644 --- a/heed/src/mdb/lmdb_error.rs +++ b/heed/src/mdb/lmdb_error.rs @@ -4,7 +4,7 @@ use std::os::raw::c_char; use std::{fmt, str}; use libc::c_int; -use lmdb_master3_sys as ffi; +use lmdb_master_sys as ffi; /// An LMDB error kind. #[derive(Debug, Copy, Clone, Eq, PartialEq)] @@ -55,12 +55,6 @@ pub enum Error { BadDbi, /// Unexpected problem - transaction should abort. Problem, - /// Page checksum incorrect. - BadChecksum, - /// Encryption/decryption failed. - CryptoFail, - /// Environment encryption mismatch. - EnvEncryption, /// Other error. Other(c_int), } @@ -94,9 +88,6 @@ impl Error { ffi::MDB_BAD_VALSIZE => Error::BadValSize, ffi::MDB_BAD_DBI => Error::BadDbi, ffi::MDB_PROBLEM => Error::Problem, - ffi::MDB_BAD_CHECKSUM => Error::BadChecksum, - ffi::MDB_CRYPTO_FAIL => Error::CryptoFail, - ffi::MDB_ENV_ENCRYPTION => Error::EnvEncryption, other => Error::Other(other), } } @@ -126,9 +117,6 @@ impl Error { Error::BadValSize => ffi::MDB_BAD_VALSIZE, Error::BadDbi => ffi::MDB_BAD_DBI, Error::Problem => ffi::MDB_PROBLEM, - Error::BadChecksum => ffi::MDB_BAD_CHECKSUM, - Error::CryptoFail => ffi::MDB_CRYPTO_FAIL, - Error::EnvEncryption => ffi::MDB_ENV_ENCRYPTION, Error::Other(err_code) => err_code, } } diff --git a/heed/src/mdb/lmdb_ffi.rs b/heed/src/mdb/lmdb_ffi.rs index d955f1d2..9f093db7 100644 --- a/heed/src/mdb/lmdb_ffi.rs +++ b/heed/src/mdb/lmdb_ffi.rs @@ -9,7 +9,7 @@ pub use ffi::{ MDB_cursor, MDB_dbi, MDB_env, MDB_envinfo, MDB_stat, MDB_txn, MDB_val, MDB_APPEND, MDB_CP_COMPACT, MDB_CREATE, MDB_CURRENT, MDB_RDONLY, MDB_RESERVE, }; -use lmdb_master3_sys as ffi; +use lmdb_master_sys as ffi; pub mod cursor_op { use super::ffi::{self, MDB_cursor_op}; diff --git a/heed/src/mdb/lmdb_flags.rs b/heed/src/mdb/lmdb_flags.rs index 9f842885..f11ec935 100644 --- a/heed/src/mdb/lmdb_flags.rs +++ b/heed/src/mdb/lmdb_flags.rs @@ -1,4 +1,4 @@ -use lmdb_master3_sys as ffi; +use lmdb_master_sys as ffi; /// LMDB flags (see for more details). #[derive(Debug, Clone, Copy, PartialEq, Eq)] diff --git a/lmdb-master3-sys/.rustfmt.toml b/lmdb-master-sys/.rustfmt.toml similarity index 100% rename from lmdb-master3-sys/.rustfmt.toml rename to lmdb-master-sys/.rustfmt.toml diff --git a/lmdb-master3-sys/Cargo.toml b/lmdb-master-sys/Cargo.toml similarity index 82% rename from lmdb-master3-sys/Cargo.toml rename to lmdb-master-sys/Cargo.toml index 6896f76d..1383f304 100644 --- a/lmdb-master3-sys/Cargo.toml +++ b/lmdb-master-sys/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "lmdb-master3-sys" +name = "lmdb-master-sys" # NB: When modifying, also modify html_root_url in lib.rs version = "0.1.0" authors = [ @@ -8,9 +8,9 @@ authors = [ "Victor Porof ", ] license = "Apache-2.0" -description = "Rust bindings for liblmdb on the mdb.master3 branch." -documentation = "https://docs.rs/lmdb-master3-sys" -repository = "https://github.com/meilisearch/heed/tree/main/lmdb-master3-sys" +description = "Rust bindings for liblmdb on the mdb.master branch." +documentation = "https://docs.rs/lmdb-master-sys" +repository = "https://github.com/meilisearch/heed/tree/main/lmdb-master-sys" keywords = ["LMDB", "database", "storage-engine", "bindings", "library"] categories = ["database", "external-ffi-bindings"] edition = "2021" @@ -19,7 +19,7 @@ edition = "2021" build = "build.rs" [lib] -name = "lmdb_master3_sys" +name = "lmdb_master_sys" [dependencies] libc = "0.2.139" diff --git a/lmdb-master3-sys/bindgen.rs b/lmdb-master-sys/bindgen.rs similarity index 100% rename from lmdb-master3-sys/bindgen.rs rename to lmdb-master-sys/bindgen.rs diff --git a/lmdb-master3-sys/build.rs b/lmdb-master-sys/build.rs similarity index 100% rename from lmdb-master3-sys/build.rs rename to lmdb-master-sys/build.rs diff --git a/lmdb-master-sys/lmdb b/lmdb-master-sys/lmdb new file mode 160000 index 00000000..3947014a --- /dev/null +++ b/lmdb-master-sys/lmdb @@ -0,0 +1 @@ +Subproject commit 3947014aed7ffe39a79991fa7fb5b234da47ad1a diff --git a/lmdb-master3-sys/src/bindings.rs b/lmdb-master-sys/src/bindings.rs similarity index 89% rename from lmdb-master3-sys/src/bindings.rs rename to lmdb-master-sys/src/bindings.rs index f3c10d20..53c24224 100644 --- a/lmdb-master3-sys/src/bindings.rs +++ b/lmdb-master-sys/src/bindings.rs @@ -1,14 +1,12 @@ /* automatically generated by rust-bindgen 0.63.0 */ pub const MDB_FMT_Z: &[u8; 2usize] = b"z\0"; -pub const MDB_RPAGE_CACHE: ::libc::c_uint = 1; pub const MDB_SIZE_MAX: u64 = 18446744073709551615; pub const MDB_VERSION_MAJOR: ::libc::c_uint = 0; pub const MDB_VERSION_MINOR: ::libc::c_uint = 9; -pub const MDB_VERSION_PATCH: ::libc::c_uint = 90; -pub const MDB_VERSION_DATE: &[u8; 12usize] = b"May 1, 2017\0"; +pub const MDB_VERSION_PATCH: ::libc::c_uint = 70; +pub const MDB_VERSION_DATE: &[u8; 18usize] = b"December 19, 2015\0"; pub const MDB_FIXEDMAP: ::libc::c_uint = 1; -pub const MDB_ENCRYPT: ::libc::c_uint = 8192; pub const MDB_NOSUBDIR: ::libc::c_uint = 16384; pub const MDB_NOSYNC: ::libc::c_uint = 65536; pub const MDB_RDONLY: ::libc::c_uint = 131072; @@ -20,7 +18,6 @@ pub const MDB_NOLOCK: ::libc::c_uint = 4194304; pub const MDB_NORDAHEAD: ::libc::c_uint = 8388608; pub const MDB_NOMEMINIT: ::libc::c_uint = 16777216; pub const MDB_PREVSNAPSHOT: ::libc::c_uint = 33554432; -pub const MDB_REMAP_CHUNKS: ::libc::c_uint = 67108864; pub const MDB_REVERSEKEY: ::libc::c_uint = 2; pub const MDB_DUPSORT: ::libc::c_uint = 4; pub const MDB_INTEGERKEY: ::libc::c_uint = 8; @@ -58,10 +55,7 @@ pub const MDB_BAD_TXN: ::libc::c_int = -30782; pub const MDB_BAD_VALSIZE: ::libc::c_int = -30781; pub const MDB_BAD_DBI: ::libc::c_int = -30780; pub const MDB_PROBLEM: ::libc::c_int = -30779; -pub const MDB_BAD_CHECKSUM: ::libc::c_int = -30778; -pub const MDB_CRYPTO_FAIL: ::libc::c_int = -30777; -pub const MDB_ENV_ENCRYPTION: ::libc::c_int = -30776; -pub const MDB_LAST_ERRCODE: ::libc::c_int = -30776; +pub const MDB_LAST_ERRCODE: ::libc::c_int = -30779; #[doc = "Unsigned type used for mapsize, entry counts and page/transaction IDs.\nIt is normally size_t, hence the name. Defining MDB_VL32 makes it\nuint64_t, but do not try this unless you know what you are doing.\n\n"] pub type mdb_size_t = usize; #[repr(C)] @@ -103,19 +97,6 @@ pub type MDB_rel_func = ::std::option::Option< relctx: *mut ::libc::c_void, ), >; -#[doc = "A callback function used to encrypt/decrypt pages in the env.\n\nEncrypt or decrypt the data in src and store the result in dst using the\nprovided key. The result must be the same number of bytes as the input.\nkey[1] is the initialization vector, and key[2] is the authentication\ndata, if any.\n\nReturns:\n\n* A non-zero error value on failure and 0 on success.\n\n# Arguments\n\n* `src` - The input data to be transformed. [Direction: In]\n* `dst` - Storage for the result. [Direction: In, Out]\n* `key` - An array of three values: key[0] is the encryption key, [Direction: In]\n* `encdec` - 1 to encrypt, 0 to decrypt. [Direction: In]\n\n"] -pub type MDB_enc_func = ::std::option::Option< - unsafe extern "C" fn( - src: *const MDB_val, - dst: *mut MDB_val, - key: *const MDB_val, - encdec: ::libc::c_int, - ) -> ::libc::c_int, ->; -#[doc = "A callback function used to checksum pages in the env.\n\nCompute the checksum of the data in src and store the result in dst,\nAn optional key may be used with keyed hash algorithms.\nparameter will be NULL if there is no key.\n\n# Arguments\n\n* `src` - The input data to be transformed. [Direction: In]\n* `dst` - Storage for the result. [Direction: In, Out]\n* `key` - An encryption key, if encryption was configured. This [Direction: In]\n\n"] -pub type MDB_sum_func = ::std::option::Option< - unsafe extern "C" fn(src: *const MDB_val, dst: *mut MDB_val, key: *const MDB_val), ->; #[doc = "Position at first key/data item\n\n"] pub const MDB_FIRST: MDB_cursor_op = 0; #[doc = "Position at first data item of current key.\nOnly for #MDB_DUPSORT\n\n"] @@ -279,10 +260,6 @@ extern "C" { #[doc = "Set the size of the memory map to use for this environment.\n\nThe size should be a multiple of the OS page size. The default is\n10485760 bytes. The size of the memory map is also the maximum size\nof the database. The value should be chosen as large as possible,\nto accommodate future growth of the database.\nThis function should be called after #mdb_env_create() and before #mdb_env_open().\nIt may be called at later times if no transactions are active in\nthis process. Note that the library does not check for this condition,\nthe caller must ensure it explicitly.\nThe new size takes effect immediately for the current process but\nwill not be persisted to any others until a write transaction has been\ncommitted by the current process. Also, only mapsize increases are\npersisted into the environment.\nIf the mapsize is increased by another process, and data has grown\nbeyond the range of the current mapsize, #mdb_txn_begin() will\nreturn #MDB_MAP_RESIZED. This function may be called with a size\nof zero to adopt the new size.\nAny attempt to set a size smaller than the space already consumed\nby the environment will be silently changed to the current size of the used space.\nerrors are:\n\n\nReturns:\n\n* A non-zero error value on failure and 0 on success. Some possible\n\n# Arguments\n\n* `env` - An environment handle returned by #mdb_env_create() [Direction: In]\n* `size` - The size in bytes [Direction: In]\n\n"] pub fn mdb_env_set_mapsize(env: *mut MDB_env, size: mdb_size_t) -> ::libc::c_int; } -extern "C" { - #[doc = "Set the size of DB pages in bytes.\n\nThe size defaults to the OS page size. Smaller or larger values may be\ndesired depending on the size of keys and values being used. Also, an\nexplicit size may need to be set when using filesystems like ZFS which\ndon't use the OS page size.\n\n"] - pub fn mdb_env_set_pagesize(env: *mut MDB_env, size: ::libc::c_int) -> ::libc::c_int; -} extern "C" { #[doc = "Set the maximum number of threads/reader slots for the environment.\n\nThis defines the number of slots in the lock table that is used to track readers in the\nthe environment. The default is 126.\nStarting a read-only transaction normally ties a lock table slot to the\ncurrent thread until the environment closes or the thread exits. If\nMDB_NOTLS is in use, #mdb_txn_begin() instead ties the slot to the\nMDB_txn object until it or the #MDB_env object is destroyed.\nThis function may only be called after #mdb_env_create() and before #mdb_env_open().\nerrors are:\n\n\nReturns:\n\n* A non-zero error value on failure and 0 on success. Some possible\n\n# Arguments\n\n* `env` - An environment handle returned by #mdb_env_create() [Direction: In]\n* `readers` - The maximum number of reader lock table slots [Direction: In]\n\n"] pub fn mdb_env_set_maxreaders(env: *mut MDB_env, readers: ::libc::c_uint) -> ::libc::c_int; @@ -315,23 +292,6 @@ extern "C" { #[doc = "Set or reset the assert() callback of the environment.\nDisabled if liblmdb is built with NDEBUG.\n\nReturns:\n\n* A non-zero error value on failure and 0 on success.\n\n# Arguments\n\n* `env` - An environment handle returned by #mdb_env_create(). [Direction: In]\n* `func` - An #MDB_assert_func function, or 0. [Direction: In]\n\n# Notes\n\n* This hack should become obsolete as lmdb's error handling matures.\n\n"] pub fn mdb_env_set_assert(env: *mut MDB_env, func: MDB_assert_func) -> ::libc::c_int; } -extern "C" { - #[doc = "Set encryption on an environment.\n\nThis must be called before #mdb_env_open().\nIt implicitly sets #MDB_REMAP_CHUNKS on the env.\nSet this to zero for unauthenticated encryption mechanisms.\n\nReturns:\n\n* A non-zero error value on failure and 0 on success.\n\n# Arguments\n\n* `env` - An environment handle returned by #mdb_env_create(). [Direction: In]\n* `func` - An #MDB_enc_func function. [Direction: In]\n* `key` - The encryption key. [Direction: In]\n* `size` - The size of authentication data in bytes, if any. [Direction: In]\n\n"] - pub fn mdb_env_set_encrypt( - env: *mut MDB_env, - func: MDB_enc_func, - key: *const MDB_val, - size: ::libc::c_uint, - ) -> ::libc::c_int; -} -extern "C" { - #[doc = "Set checksums on an environment.\n\nThis must be called before #mdb_env_open().\n\nReturns:\n\n* A non-zero error value on failure and 0 on success.\n\n# Arguments\n\n* `env` - An environment handle returned by #mdb_env_create(). [Direction: In]\n* `func` - An #MDB_sum_func function. [Direction: In]\n* `size` - The size of computed checksum values, in bytes. [Direction: In]\n\n"] - pub fn mdb_env_set_checksum( - env: *mut MDB_env, - func: MDB_sum_func, - size: ::libc::c_uint, - ) -> ::libc::c_int; -} extern "C" { #[doc = "Create a transaction for use with the environment.\n\nThe transaction handle may be discarded using #mdb_txn_abort() or #mdb_txn_commit().\nthread, and a thread may only have a single transaction at a time.\nIf #MDB_NOTLS is in use, this does not apply to read-only transactions.\nwill be a nested transaction, with the transaction indicated by \\b parent\nas its parent. Transactions may be nested to any level. A parent\ntransaction and its cursors may not issue any other operations than\nmdb_txn_commit and mdb_txn_abort while it has active child transactions.\nmust be set to 0 or by bitwise OR'ing together one or more of the\nvalues described here.\n\nerrors are:\n\n\nReturns:\n\n* A non-zero error value on failure and 0 on success. Some possible\n\n# Arguments\n\n* `env` - An environment handle returned by #mdb_env_create() [Direction: In]\n* `parent` - If this parameter is non-NULL, the new transaction [Direction: In]\n* `flags` - Special options for this transaction. This parameter [Direction: In]\n* `txn` - Address where the new #MDB_txn handle will be stored [Direction: In, Out]\n\n# Notes\n\n* A transaction and its cursors must only be used by a single\n* Cursors may not span transactions.\n\n"] pub fn mdb_txn_begin( @@ -366,7 +326,7 @@ extern "C" { pub fn mdb_txn_renew(txn: *mut MDB_txn) -> ::libc::c_int; } extern "C" { - #[doc = "Open a database in the environment.\n\nA database handle denotes the name and parameters of a database,\nindependently of whether such a database exists.\nThe database handle may be discarded by calling #mdb_dbi_close().\nThe old database handle is returned if the database was already open.\nThe handle may only be closed once.\nThe database handle will be private to the current transaction until\nthe transaction is successfully committed. If the transaction is\naborted the handle will be closed automatically.\nAfter a successful commit the handle will reside in the shared\nenvironment, and may be used by other transactions.\nThis function must not be called from multiple concurrent\ntransactions in the same process. A transaction that uses\nthis function must finish (either commit or abort) before\nany other transaction in the process may use this function.\nTo use named databases (with name != NULL), #mdb_env_set_maxdbs()\nmust be called before opening the environment. Database names are\nkeys in the unnamed database, and may be read but not written.\nIn LMDB 0.9 the NUL terminator was omitted.\ndatabase is needed in the environment, this value may be NULL.\nmust be set to 0 or by bitwise OR'ing together one or more of the\nvalues described here.\n\nerrors are:\n\n\nReturns:\n\n* A non-zero error value on failure and 0 on success. Some possible\n\n# Arguments\n\n* `txn` - A transaction handle returned by #mdb_txn_begin() [Direction: In]\n* `name` - The name of the database to open. If only a single [Direction: In]\n* `flags` - Special options for this database. This parameter [Direction: In]\n* `dbi` - Address where the new #MDB_dbi handle will be stored [Direction: In, Out]\n\n# Notes\n\n* Names are C strings and stored with their NUL terminator included.\n\n"] + #[doc = "Open a database in the environment.\n\nA database handle denotes the name and parameters of a database,\nindependently of whether such a database exists.\nThe database handle may be discarded by calling #mdb_dbi_close().\nThe old database handle is returned if the database was already open.\nThe handle may only be closed once.\nThe database handle will be private to the current transaction until\nthe transaction is successfully committed. If the transaction is\naborted the handle will be closed automatically.\nAfter a successful commit the handle will reside in the shared\nenvironment, and may be used by other transactions.\nThis function must not be called from multiple concurrent\ntransactions in the same process. A transaction that uses\nthis function must finish (either commit or abort) before\nany other transaction in the process may use this function.\nTo use named databases (with name != NULL), #mdb_env_set_maxdbs()\nmust be called before opening the environment. Database names are\nkeys in the unnamed database, and may be read but not written.\ndatabase is needed in the environment, this value may be NULL.\nmust be set to 0 or by bitwise OR'ing together one or more of the\nvalues described here.\n\nerrors are:\n\n\nReturns:\n\n* A non-zero error value on failure and 0 on success. Some possible\n\n# Arguments\n\n* `txn` - A transaction handle returned by #mdb_txn_begin() [Direction: In]\n* `name` - The name of the database to open. If only a single [Direction: In]\n* `flags` - Special options for this database. This parameter [Direction: In]\n* `dbi` - Address where the new #MDB_dbi handle will be stored [Direction: In, Out]\n\n"] pub fn mdb_dbi_open( txn: *mut MDB_txn, name: *const ::libc::c_char, @@ -466,10 +426,6 @@ extern "C" { #[doc = "Return the cursor's database handle.\n\n# Arguments\n\n* `cursor` - A cursor handle returned by #mdb_cursor_open() [Direction: In]\n\n"] pub fn mdb_cursor_dbi(cursor: *mut MDB_cursor) -> MDB_dbi; } -extern "C" { - #[doc = "Check if the cursor is pointing to a named database record.\n\nReturns:\n\n* 1 if current record is a named database, 0 otherwise.\n\n# Arguments\n\n* `cursor` - A cursor handle returned by #mdb_cursor_open() [Direction: In]\n\n"] - pub fn mdb_cursor_is_db(cursor: *mut MDB_cursor) -> ::libc::c_int; -} extern "C" { #[doc = "Retrieve by cursor.\n\nThis function retrieves key/data pairs from the database. The address and length\nof the key are returned in the object to which \\b key refers (except for the\ncase of the #MDB_SET option, in which the \\b key object is unchanged), and\nthe address and length of the data are returned in the object to which \\b data\nrefers.\nSee #mdb_get() for restrictions on using the output values.\nerrors are:\n\n\nReturns:\n\n* A non-zero error value on failure and 0 on success. Some possible\n\n# Arguments\n\n* `cursor` - A cursor handle returned by #mdb_cursor_open() [Direction: In]\n* `key` - The key for a retrieved item [Direction: Out]\n* `data` - The data of a retrieved item [Direction: Out]\n* `op` - A cursor operation #MDB_cursor_op [Direction: In]\n\n"] pub fn mdb_cursor_get( @@ -530,23 +486,3 @@ extern "C" { #[doc = "Check for stale entries in the reader lock table.\n\nReturns:\n\n* 0 on success, non-zero on failure.\n\n# Arguments\n\n* `env` - An environment handle returned by #mdb_env_create() [Direction: In]\n* `dead` - Number of stale slots that were cleared [Direction: In, Out]\n\n"] pub fn mdb_reader_check(env: *mut MDB_env, dead: *mut ::libc::c_int) -> ::libc::c_int; } -#[doc = "A function for converting a string into an encryption key.\n\nprovide the space for the key.\n\nReturns:\n\n* 0 on success, non-zero on failure.\n\n# Arguments\n\n* `passwd` - The string to be converted. [Direction: In]\n* `key` - The resulting key. The caller must [Direction: Out]\n\n"] -pub type MDB_str2key_func = ::std::option::Option< - unsafe extern "C" fn(passwd: *const ::libc::c_char, key: *mut MDB_val) -> ::libc::c_int, ->; -#[doc = "A structure for dynamically loaded crypto modules.\n\nThis is the information that the command line tools expect\nin order to operate on encrypted or checksummed environments.\n\n"] -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct MDB_crypto_funcs { - pub mcf_str2key: MDB_str2key_func, - pub mcf_encfunc: MDB_enc_func, - pub mcf_sumfunc: MDB_sum_func, - #[doc = "The size of an encryption key, in bytes\n\n"] - pub mcf_keysize: ::libc::c_int, - #[doc = "The size of the MAC, for authenticated encryption\n\n"] - pub mcf_esumsize: ::libc::c_int, - #[doc = "The size of the checksum, for plain checksums\n\n"] - pub mcf_sumsize: ::libc::c_int, -} -#[doc = "The function that returns the #MDB_crypto_funcs structure.\n\nThe command line tools expect this function to be named \"MDB_crypto\".\nIt must be exported by the dynamic module so that the tools can use it.\n\nReturns:\n\n* A pointer to a #MDB_crypto_funcs structure.\n\n"] -pub type MDB_crypto_hooks = ::std::option::Option *mut MDB_crypto_funcs>; diff --git a/lmdb-master3-sys/src/lib.rs b/lmdb-master-sys/src/lib.rs similarity index 88% rename from lmdb-master3-sys/src/lib.rs rename to lmdb-master-sys/src/lib.rs index 9110ce16..947b880b 100644 --- a/lmdb-master3-sys/src/lib.rs +++ b/lmdb-master-sys/src/lib.rs @@ -2,7 +2,7 @@ #![allow(rustdoc::broken_intra_doc_links)] #![allow(non_camel_case_types)] #![allow(clippy::all)] -#![doc(html_root_url = "https://docs.rs/lmdb-master3-sys/0.1.0")] +#![doc(html_root_url = "https://docs.rs/lmdb-master-sys/0.1.0")] extern crate libc; diff --git a/lmdb-master3-sys/tests/fixtures/testdb-32/data.mdb b/lmdb-master-sys/tests/fixtures/testdb-32/data.mdb similarity index 100% rename from lmdb-master3-sys/tests/fixtures/testdb-32/data.mdb rename to lmdb-master-sys/tests/fixtures/testdb-32/data.mdb diff --git a/lmdb-master3-sys/tests/fixtures/testdb-32/lock.mdb b/lmdb-master-sys/tests/fixtures/testdb-32/lock.mdb similarity index 100% rename from lmdb-master3-sys/tests/fixtures/testdb-32/lock.mdb rename to lmdb-master-sys/tests/fixtures/testdb-32/lock.mdb diff --git a/lmdb-master3-sys/tests/lmdb.rs b/lmdb-master-sys/tests/lmdb.rs similarity index 100% rename from lmdb-master3-sys/tests/lmdb.rs rename to lmdb-master-sys/tests/lmdb.rs diff --git a/lmdb-master3-sys/tests/simple.rs b/lmdb-master-sys/tests/simple.rs similarity index 96% rename from lmdb-master3-sys/tests/simple.rs rename to lmdb-master-sys/tests/simple.rs index cabeb8b3..e82fb670 100644 --- a/lmdb-master3-sys/tests/simple.rs +++ b/lmdb-master-sys/tests/simple.rs @@ -1,4 +1,4 @@ -use lmdb_master3_sys::*; +use lmdb_master_sys::*; use std::ffi::c_void; use std::fs::{self, File}; @@ -9,7 +9,7 @@ use std::ptr; macro_rules! E { ($expr:expr) => {{ match $expr { - lmdb_master3_sys::MDB_SUCCESS => (), + lmdb_master_sys::MDB_SUCCESS => (), err_code => assert!(false, "Failed with code {}", err_code), } }}; diff --git a/lmdb-master3-sys/lmdb b/lmdb-master3-sys/lmdb deleted file mode 160000 index b9db2582..00000000 --- a/lmdb-master3-sys/lmdb +++ /dev/null @@ -1 +0,0 @@ -Subproject commit b9db2582cb31aa0ec88371db388095cc31ceb2f4