-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Ilya Miheev
committed
Feb 13, 2025
1 parent
61457fd
commit 60aa95e
Showing
25 changed files
with
2,338 additions
and
1,739 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
mdbx.c | ||
mdbx.c++ | ||
mdbx_chk.c | ||
mdbx_copy.c | ||
mdbx_drop.c | ||
mdbx_dump.c | ||
mdbx_load.c | ||
mdbx_stat.c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright (c) 2020-2024 Леонид Юрьев aka Leonid Yuriev <[email protected]> ############################################### | ||
# Copyright (c) 2020-2025 Леонид Юрьев aka Leonid Yuriev <[email protected]> ############################################### | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
# Donations are welcome to ETH `0xD104d8f8B2dC312aaD74899F83EBf3EEBDC1EA3A`. Всё будет хорошо! | ||
|
@@ -149,6 +149,9 @@ if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git" | |
AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/tree-ops.c" | ||
AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/txl.c" | ||
AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/txl.h" | ||
AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/txn-basal.c" | ||
AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/txn-nested.c" | ||
AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/txn-ro.c" | ||
AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/txn.c" | ||
AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/unaligned.h" | ||
AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/utils.c" | ||
|
@@ -213,6 +216,20 @@ if(DEFINED PROJECT_NAME AND NOT MDBX_FORCE_BUILD_AS_MAIN_PROJECT) | |
else() | ||
set(SUBPROJECT OFF) | ||
set(NOT_SUBPROJECT ON) | ||
|
||
# Setup Apple stuff which should be set prior to the first project() or enable_language() | ||
if(APPLE) | ||
# Enable universal binaries for macOS (target arm64 and x86_64) | ||
if(NOT DEFINED CMAKE_OSX_ARCHITECTURES) | ||
set(CMAKE_OSX_ARCHITECTURES "arm64;x86_64") | ||
endif() | ||
|
||
# Set the minimum macOS deployment target if not already defined | ||
if(NOT DEFINED CMAKE_OSX_DEPLOYMENT_TARGET) | ||
set(CMAKE_OSX_DEPLOYMENT_TARGET "13.0") | ||
endif() | ||
endif() | ||
|
||
project(libmdbx C) | ||
if(NOT MDBX_AMALGAMATED_SOURCE AND NOT DEFINED BUILD_TESTING) | ||
set(BUILD_TESTING ON) | ||
|
@@ -824,6 +841,9 @@ else() | |
"${MDBX_SOURCE_DIR}/tree-ops.c" | ||
"${MDBX_SOURCE_DIR}/txl.c" | ||
"${MDBX_SOURCE_DIR}/txl.h" | ||
"${MDBX_SOURCE_DIR}/txn-basal.c" | ||
"${MDBX_SOURCE_DIR}/txn-nested.c" | ||
"${MDBX_SOURCE_DIR}/txn-ro.c" | ||
"${MDBX_SOURCE_DIR}/txn.c" | ||
"${MDBX_SOURCE_DIR}/unaligned.h" | ||
"${MDBX_SOURCE_DIR}/utils.c" | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ to the Telegram' group https://t.me/libmdbx. | |
Donations are welcome to ETH `0xD104d8f8B2dC312aaD74899F83EBf3EEBDC1EA3A`. | ||
Всё будет хорошо! | ||
|
||
Copyright 2015-2024 Леонид Юрьев aka Leonid Yuriev <[email protected]> | ||
Copyright 2015-2025 Леонид Юрьев aka Leonid Yuriev <[email protected]> | ||
SPDX-License-Identifier: Apache-2.0 | ||
For notes about the license change, credits and acknowledgments, | ||
please refer to the COPYRIGHT file within original libmdbx source code | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,9 @@ | |
> with [`C` API description](https://libmdbx.dqdkfa.ru/group__c__api.html) | ||
> and pay attention to the [`C++` API](https://gitflic.ru/project/erthink/libmdbx/blob?file=mdbx.h%2B%2B#line-num-1). | ||
> Questions, feedback and suggestions are welcome to the [Telegram' group](https://t.me/libmdbx). | ||
> Questions, feedback and suggestions are welcome to the [Telegram' group](https://t.me/libmdbx) (archive [1](https://libmdbx.dqdkfa.ru/tg-archive/messages1.html), | ||
> [2](https://libmdbx.dqdkfa.ru/tg-archive/messages2.html), [3](https://libmdbx.dqdkfa.ru/tg-archive/messages3.html), [4](https://libmdbx.dqdkfa.ru/tg-archive/messages4.html), | ||
> [5](https://libmdbx.dqdkfa.ru/tg-archive/messages5.html), [6](https://libmdbx.dqdkfa.ru/tg-archive/messages6.html), [7](https://libmdbx.dqdkfa.ru/tg-archive/messages7.html)). | ||
> See the [ChangeLog](https://gitflic.ru/project/erthink/libmdbx/blob?file=ChangeLog.md) for `NEWS` and latest updates. | ||
> Donations are welcome to ETH `0xD104d8f8B2dC312aaD74899F83EBf3EEBDC1EA3A`. | ||
|
@@ -634,19 +636,24 @@ Bindings | |
|
||
| Runtime | Repo | Author | | ||
| ------- | ------ | ------ | | ||
| Rust | [libmdbx-rs](https://github.com/vorot93/libmdbx-rs) | [Artem Vorotnikov](https://github.com/vorot93) | | ||
| Python | [PyPi/libmdbx](https://pypi.org/project/libmdbx/) | [Lazymio](https://github.com/wtdcode) | | ||
| Java | [mdbxjni](https://github.com/castortech/mdbxjni) | [Castor Technologies](https://castortech.com/) | | ||
| Go | [mdbx-go](https://github.com/torquem-ch/mdbx-go) | [Alex Sharov](https://github.com/AskAlexSharov) | | ||
| Ruby | [ruby-mdbx](https://rubygems.org/gems/mdbx/) | [Mahlon E. Smith](https://github.com/mahlonsmith) | | ||
|
||
##### Obsolete/Outdated/Unsupported: | ||
|
||
| Runtime | Repo | Author | | ||
| ------- | ------ | ------ | | ||
| .NET | [mdbx.NET](https://github.com/wangjia184/mdbx.NET) | [Jerry Wang](https://github.com/wangjia184) | | ||
| Scala | [mdbx4s](https://github.com/david-bouyssie/mdbx4s) | [David Bouyssié](https://github.com/david-bouyssie) | | ||
| Rust | [mdbx](https://crates.io/crates/mdbx) | [gcxfd](https://github.com/gcxfd) | | ||
| Haskell | [libmdbx-hs](https://hackage.haskell.org/package/libmdbx) | [Francisco Vallarino](https://github.com/fjvallarino) | | ||
| Lua | [lua-libmdbx](https://github.com/mah0x211/lua-libmdbx) | [Masatoshi Fukunaga](https://github.com/mah0x211) | | ||
| NodeJS, [Deno](https://deno.land/) | [lmdbx-js](https://github.com/kriszyp/lmdbx-js) | [Kris Zyp](https://github.com/kriszyp/) | ||
| NodeJS | [node-mdbx](https://www.npmjs.com/package/node-mdbx/) | [Сергей Федотов](mailto:[email protected]) | | ||
| Ruby | [ruby-mdbx](https://rubygems.org/gems/mdbx/) | [Mahlon E. Smith](https://github.com/mahlonsmith) | | ||
| Go | [mdbx-go](https://github.com/torquem-ch/mdbx-go) | [Alex Sharov](https://github.com/AskAlexSharov) | | ||
| [Nim](https://en.wikipedia.org/wiki/Nim_(programming_language)) | [NimDBX](https://github.com/snej/nimdbx) | [Jens Alfke](https://github.com/snej) | ||
| Lua | [lua-libmdbx](https://github.com/mah0x211/lua-libmdbx) | [Masatoshi Fukunaga](https://github.com/mah0x211) | | ||
| Rust | [libmdbx-rs](https://github.com/vorot93/libmdbx-rs) | [Artem Vorotnikov](https://github.com/vorot93) | | ||
| Rust | [mdbx](https://crates.io/crates/mdbx) | [gcxfd](https://github.com/gcxfd) | | ||
| Java | [mdbxjni](https://github.com/castortech/mdbxjni) | [Castor Technologies](https://castortech.com/) | | ||
| Python | [PyPi/libmdbx](https://pypi.org/project/libmdbx/) | [Lazymio](https://github.com/wtdcode) | | ||
| .NET (obsolete) | [mdbx.NET](https://github.com/wangjia184/mdbx.NET) | [Jerry Wang](https://github.com/wangjia184) | | ||
| Nim | [NimDBX](https://github.com/snej/nimdbx) | [Jens Alfke](https://github.com/snej) | ||
|
||
<!-- section-end --> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{ "git_describe": "v0.14.0-53-g4730abe3", "git_timestamp": "2025-02-11T14:01:10+03:00", "git_tree": "045bfa04a0690584d8256d2d8ea3dffb1325b7d0", "git_commit": "4730abe3e55c95e53e05d2ffbd83ed6a7cb21fe5", "semver": "0.14.0.53" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright (c) 2010-2024 Леонид Юрьев aka Leonid Yuriev <[email protected]> ############################################### | ||
# Copyright (c) 2010-2025 Леонид Юрьев aka Leonid Yuriev <[email protected]> ############################################### | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
if(CMAKE_VERSION VERSION_LESS 3.8.2) | ||
|
@@ -502,7 +502,11 @@ if(CMAKE_COMPILER_IS_GNU${CMAKE_PRIMARY_LANG} | |
AND CMAKE_GCC_RANLIB | ||
AND gcc_lto_wrapper) | ||
message(STATUS "Found GCC's LTO toolset: ${gcc_lto_wrapper}, ${CMAKE_GCC_AR}, ${CMAKE_GCC_RANLIB}") | ||
set(GCC_LTO_CFLAGS "-flto -fno-fat-lto-objects -fuse-linker-plugin") | ||
if(CMAKE_${CMAKE_PRIMARY_LANG}_COMPILER_VERSION VERSION_LESS 11.4) | ||
set(GCC_LTO_CFLAGS "-flto -fno-fat-lto-objects -fuse-linker-plugin") | ||
else() | ||
set(GCC_LTO_CFLAGS "-flto=auto -fno-fat-lto-objects -fuse-linker-plugin") | ||
endif() | ||
set(GCC_LTO_AVAILABLE TRUE) | ||
message(STATUS "Link-Time Optimization by GCC is available") | ||
else() | ||
|
@@ -541,13 +545,21 @@ if(CMAKE_COMPILER_IS_CLANG) | |
if(regexp_valid) | ||
string(REGEX REPLACE "(^|\n.*)(.*programs: =)([^\n]+)((\n.*)|$)" "\\3" list ${clang_search_dirs}) | ||
string(REPLACE ":" ";" list "${list}") | ||
set(libs_extra_subdirs "lib;../lib;lib64;../lib64;lib32;../lib32") | ||
foreach(dir IN LISTS list) | ||
get_filename_component(dir "${dir}" REALPATH) | ||
if(dir MATCHES ".*llvm.*" OR dir MATCHES ".*clang.*") | ||
list(APPEND clang_bindirs "${dir}") | ||
set(list_suffix "") | ||
else() | ||
list(APPEND clang_bindirs_x "${dir}") | ||
set(list_suffix "_x") | ||
endif() | ||
list(APPEND clang_bindirs${list_suffix} "${dir}") | ||
foreach(subdir IN LISTS libs_extra_subdirs) | ||
get_filename_component(subdir "${dir}/${subdir}" REALPATH) | ||
if(EXISTS "${subdir}") | ||
list(APPEND clang_libdirs${list_suffix} "${subdir}") | ||
endif() | ||
endforeach() | ||
endforeach() | ||
list(APPEND clang_bindirs "${clang_bindirs_x}") | ||
list(REMOVE_DUPLICATES clang_bindirs) | ||
|
@@ -559,10 +571,11 @@ if(CMAKE_COMPILER_IS_CLANG) | |
foreach(dir IN LISTS list) | ||
get_filename_component(dir "${dir}" REALPATH) | ||
if(dir MATCHES ".*llvm.*" OR dir MATCHES ".*clang.*") | ||
list(APPEND clang_libdirs "${dir}") | ||
set(list_suffix "") | ||
else() | ||
list(APPEND clang_libdirs_x "${dir}") | ||
set(list_suffix "_x") | ||
endif() | ||
list(APPEND clang_libdirs${list_suffix} "${dir}") | ||
endforeach() | ||
list(APPEND clang_libdirs "${clang_libdirs_x}") | ||
list(REMOVE_DUPLICATES clang_libdirs) | ||
|
@@ -655,9 +668,7 @@ if(CMAKE_COMPILER_IS_CLANG) | |
if(CMAKE_CLANG_AR | ||
AND CMAKE_CLANG_NM | ||
AND CMAKE_CLANG_RANLIB | ||
AND ((CLANG_LTO_PLUGIN AND CMAKE_LD_GOLD) | ||
OR (CMAKE_CLANG_LD AND NOT (CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SYSTEM_NAME STREQUAL "Linux")) | ||
OR APPLE)) | ||
AND ((CLANG_LTO_PLUGIN AND CMAKE_LD_GOLD) OR CMAKE_CLANG_LD OR APPLE)) | ||
if(ANDROID AND CMAKE_${CMAKE_PRIMARY_LANG}_COMPILER_VERSION VERSION_LESS 12) | ||
set(CLANG_LTO_AVAILABLE FALSE) | ||
message( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright (c) 2012-2024 Леонид Юрьев aka Leonid Yuriev <[email protected]> ############################################### | ||
# Copyright (c) 2012-2025 Леонид Юрьев aka Leonid Yuriev <[email protected]> ############################################### | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
if(CMAKE_VERSION VERSION_LESS 3.8.2) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright (c) 2012-2024 Леонид Юрьев aka Leonid Yuriev <[email protected]> ############################################### | ||
# Copyright (c) 2012-2025 Леонид Юрьев aka Leonid Yuriev <[email protected]> ############################################### | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
if(CMAKE_VERSION VERSION_LESS 3.8.2) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
.\" Copyright 2015-2024 Leonid Yuriev <[email protected]>. | ||
.\" Copyright 2015-2025 Leonid Yuriev <[email protected]>. | ||
.\" Copying restrictions apply. See COPYRIGHT/LICENSE. | ||
.TH MDBX_CHK 1 "2024-08-29" "MDBX 0.13" | ||
.TH MDBX_CHK 1 "2025-01-14" "MDBX 0.14" | ||
.SH NAME | ||
mdbx_chk \- MDBX checking tool | ||
.SH SYNOPSIS | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
.\" Copyright 2015-2024 Leonid Yuriev <[email protected]>. | ||
.\" Copyright 2015-2025 Leonid Yuriev <[email protected]>. | ||
.\" Copyright 2015,2016 Peter-Service R&D LLC <http://billing.ru/>. | ||
.\" Copyright 2012-2015 Howard Chu, Symas Corp. All Rights Reserved. | ||
.\" Copying restrictions apply. See COPYRIGHT/LICENSE. | ||
.TH MDBX_COPY 1 "2024-08-29" "MDBX 0.13" | ||
.TH MDBX_COPY 1 "2025-01-14" "MDBX 0.14" | ||
.SH NAME | ||
mdbx_copy \- MDBX environment copy tool | ||
.SH SYNOPSIS | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
.\" Copyright 2021-2024 Leonid Yuriev <[email protected]>. | ||
.\" Copyright 2021-2025 Leonid Yuriev <[email protected]>. | ||
.\" Copyright 2014-2021 Howard Chu, Symas Corp. All Rights Reserved. | ||
.\" Copying restrictions apply. See COPYRIGHT/LICENSE. | ||
.TH MDBX_DROP 1 "2024-08-29" "MDBX 0.13" | ||
.TH MDBX_DROP 1 "2025-01-14" "MDBX 0.14" | ||
.SH NAME | ||
mdbx_drop \- MDBX database delete tool | ||
.SH SYNOPSIS | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
.\" Copyright 2015-2024 Leonid Yuriev <[email protected]>. | ||
.\" Copyright 2015-2025 Leonid Yuriev <[email protected]>. | ||
.\" Copyright 2015,2016 Peter-Service R&D LLC <http://billing.ru/>. | ||
.\" Copyright 2014-2015 Howard Chu, Symas Corp. All Rights Reserved. | ||
.\" Copying restrictions apply. See COPYRIGHT/LICENSE. | ||
.TH MDBX_DUMP 1 "2024-08-29" "MDBX 0.13" | ||
.TH MDBX_DUMP 1 "2025-01-14" "MDBX 0.14" | ||
.SH NAME | ||
mdbx_dump \- MDBX environment export tool | ||
.SH SYNOPSIS | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
.\" Copyright 2015-2024 Leonid Yuriev <[email protected]>. | ||
.\" Copyright 2015-2025 Leonid Yuriev <[email protected]>. | ||
.\" Copyright 2015,2016 Peter-Service R&D LLC <http://billing.ru/>. | ||
.\" Copyright 2014-2015 Howard Chu, Symas Corp. All Rights Reserved. | ||
.\" Copying restrictions apply. See COPYRIGHT/LICENSE. | ||
.TH MDBX_LOAD 1 "2024-08-29" "MDBX 0.13" | ||
.TH MDBX_LOAD 1 "2025-01-14" "MDBX 0.14" | ||
.SH NAME | ||
mdbx_load \- MDBX environment import tool | ||
.SH SYNOPSIS | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
.\" Copyright 2015-2024 Leonid Yuriev <[email protected]>. | ||
.\" Copyright 2015-2025 Leonid Yuriev <[email protected]>. | ||
.\" Copyright 2015,2016 Peter-Service R&D LLC <http://billing.ru/>. | ||
.\" Copyright 2012-2015 Howard Chu, Symas Corp. All Rights Reserved. | ||
.\" Copying restrictions apply. See COPYRIGHT/LICENSE. | ||
.TH MDBX_STAT 1 "2024-08-29" "MDBX 0.13" | ||
.TH MDBX_STAT 1 "2025-01-14" "MDBX 0.14" | ||
.SH NAME | ||
mdbx_stat \- MDBX environment status tool | ||
.SH SYNOPSIS | ||
|
Oops, something went wrong.