upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/Cargo.lock
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2025-12-03 08:54:00 +0000
committerDanConwayDev <DanConwayDev@protonmail.com>2025-12-03 08:54:00 +0000
commit2f8ecd482077d82f2d1a937c7f979eaaa87a27b2 (patch)
treecd892cde6ef6fd7ff654377946cab5b95339276f /Cargo.lock
parent62a3855cb96616caf704a0f112fb2ade99fb8b45 (diff)
feat: implement LMDB database backend
- Add nostr-lmdb dependency (v0.44) for persistent storage - Create SharedDatabase type alias for database abstraction - Update all database-related functions to use trait object - Support runtime selection via NGIT_DATABASE_BACKEND env var Database backends: - memory: In-memory (default, fastest, no persistence) - lmdb: LMDB backend (persistent, general purpose) All 34 tests pass with the new implementation.
Diffstat (limited to 'Cargo.lock')
-rw-r--r--Cargo.lock239
1 files changed, 239 insertions, 0 deletions
diff --git a/Cargo.lock b/Cargo.lock
index aa78542..6fcb65f 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -248,6 +248,9 @@ name = "bitflags"
248version = "2.10.0" 248version = "2.10.0"
249source = "registry+https://github.com/rust-lang/crates.io-index" 249source = "registry+https://github.com/rust-lang/crates.io-index"
250checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3" 250checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3"
251dependencies = [
252 "serde_core",
253]
251 254
252[[package]] 255[[package]]
253name = "block-buffer" 256name = "block-buffer"
@@ -274,6 +277,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
274checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" 277checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43"
275 278
276[[package]] 279[[package]]
280name = "byteorder"
281version = "1.5.0"
282source = "registry+https://github.com/rust-lang/crates.io-index"
283checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
284
285[[package]]
277name = "bytes" 286name = "bytes"
278version = "1.10.1" 287version = "1.10.1"
279source = "registry+https://github.com/rust-lang/crates.io-index" 288source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -433,6 +442,21 @@ dependencies = [
433] 442]
434 443
435[[package]] 444[[package]]
445name = "crossbeam-queue"
446version = "0.3.12"
447source = "registry+https://github.com/rust-lang/crates.io-index"
448checksum = "0f58bbc28f91df819d0aa2a2c00cd19754769c2fad90579b3592b1c9ba7a3115"
449dependencies = [
450 "crossbeam-utils",
451]
452
453[[package]]
454name = "crossbeam-utils"
455version = "0.8.21"
456source = "registry+https://github.com/rust-lang/crates.io-index"
457checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28"
458
459[[package]]
436name = "crypto-common" 460name = "crypto-common"
437version = "0.1.6" 461version = "0.1.6"
438source = "registry+https://github.com/rust-lang/crates.io-index" 462source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -478,6 +502,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
478checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" 502checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b"
479 503
480[[package]] 504[[package]]
505name = "doxygen-rs"
506version = "0.4.2"
507source = "registry+https://github.com/rust-lang/crates.io-index"
508checksum = "415b6ec780d34dcf624666747194393603d0373b7141eef01d12ee58881507d9"
509dependencies = [
510 "phf",
511]
512
513[[package]]
481name = "either" 514name = "either"
482version = "1.15.0" 515version = "1.15.0"
483source = "registry+https://github.com/rust-lang/crates.io-index" 516source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -521,6 +554,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
521checksum = "52051878f80a721bb68ebfbc930e07b65ba72f2da88968ea5c06fd6ca3d3a127" 554checksum = "52051878f80a721bb68ebfbc930e07b65ba72f2da88968ea5c06fd6ca3d3a127"
522 555
523[[package]] 556[[package]]
557name = "flatbuffers"
558version = "25.9.23"
559source = "registry+https://github.com/rust-lang/crates.io-index"
560checksum = "09b6620799e7340ebd9968d2e0708eb82cf1971e9a16821e2091b6d6e475eed5"
561dependencies = [
562 "bitflags 2.10.0",
563 "rustc_version",
564]
565
566[[package]]
524name = "flate2" 567name = "flate2"
525version = "1.1.5" 568version = "1.1.5"
526source = "registry+https://github.com/rust-lang/crates.io-index" 569source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -531,6 +574,18 @@ dependencies = [
531] 574]
532 575
533[[package]] 576[[package]]
577name = "flume"
578version = "0.11.1"
579source = "registry+https://github.com/rust-lang/crates.io-index"
580checksum = "da0e4dd2a88388a1f4ccc7c9ce104604dab68d9f408dc34cd45823d5a9069095"
581dependencies = [
582 "futures-core",
583 "futures-sink",
584 "nanorand",
585 "spin",
586]
587
588[[package]]
534name = "fnv" 589name = "fnv"
535version = "1.0.7" 590version = "1.0.7"
536source = "registry+https://github.com/rust-lang/crates.io-index" 591source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -769,6 +824,40 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
769checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" 824checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
770 825
771[[package]] 826[[package]]
827name = "heed"
828version = "0.20.5"
829source = "registry+https://github.com/rust-lang/crates.io-index"
830checksum = "7d4f449bab7320c56003d37732a917e18798e2f1709d80263face2b4f9436ddb"
831dependencies = [
832 "bitflags 2.10.0",
833 "byteorder",
834 "heed-traits",
835 "heed-types",
836 "libc",
837 "lmdb-master-sys",
838 "once_cell",
839 "page_size",
840 "synchronoise",
841 "url",
842]
843
844[[package]]
845name = "heed-traits"
846version = "0.20.0"
847source = "registry+https://github.com/rust-lang/crates.io-index"
848checksum = "eb3130048d404c57ce5a1ac61a903696e8fcde7e8c2991e9fcfc1f27c3ef74ff"
849
850[[package]]
851name = "heed-types"
852version = "0.20.1"
853source = "registry+https://github.com/rust-lang/crates.io-index"
854checksum = "9d3f528b053a6d700b2734eabcd0fd49cb8230647aa72958467527b0b7917114"
855dependencies = [
856 "byteorder",
857 "heed-traits",
858]
859
860[[package]]
772name = "hex" 861name = "hex"
773version = "0.4.3" 862version = "0.4.3"
774source = "registry+https://github.com/rust-lang/crates.io-index" 863source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1152,6 +1241,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
1152checksum = "6373607a59f0be73a39b6fe456b8192fcc3585f602af20751600e974dd455e77" 1241checksum = "6373607a59f0be73a39b6fe456b8192fcc3585f602af20751600e974dd455e77"
1153 1242
1154[[package]] 1243[[package]]
1244name = "lmdb-master-sys"
1245version = "0.2.5"
1246source = "registry+https://github.com/rust-lang/crates.io-index"
1247checksum = "864808e0b19fb6dd3b70ba94ee671b82fce17554cf80aeb0a155c65bb08027df"
1248dependencies = [
1249 "cc",
1250 "doxygen-rs",
1251 "libc",
1252]
1253
1254[[package]]
1155name = "lock_api" 1255name = "lock_api"
1156version = "0.4.14" 1256version = "0.4.14"
1157source = "registry+https://github.com/rust-lang/crates.io-index" 1257source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1215,6 +1315,15 @@ dependencies = [
1215] 1315]
1216 1316
1217[[package]] 1317[[package]]
1318name = "nanorand"
1319version = "0.7.0"
1320source = "registry+https://github.com/rust-lang/crates.io-index"
1321checksum = "6a51313c5820b0b02bd422f4b44776fbf47961755c74ce64afc73bfad10226c3"
1322dependencies = [
1323 "getrandom 0.2.16",
1324]
1325
1326[[package]]
1218name = "native-tls" 1327name = "native-tls"
1219version = "0.2.14" 1328version = "0.2.14"
1220source = "registry+https://github.com/rust-lang/crates.io-index" 1329source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1250,6 +1359,7 @@ dependencies = [
1250 "http-body-util", 1359 "http-body-util",
1251 "hyper 1.8.1", 1360 "hyper 1.8.1",
1252 "hyper-util", 1361 "hyper-util",
1362 "nostr-lmdb",
1253 "nostr-relay-builder", 1363 "nostr-relay-builder",
1254 "nostr-sdk 0.44.1", 1364 "nostr-sdk 0.44.1",
1255 "serde", 1365 "serde",
@@ -1327,6 +1437,7 @@ version = "0.44.0"
1327source = "registry+https://github.com/rust-lang/crates.io-index" 1437source = "registry+https://github.com/rust-lang/crates.io-index"
1328checksum = "7462c9d8ae5ef6a28d66a192d399ad2530f1f2130b13186296dbb11bdef5b3d1" 1438checksum = "7462c9d8ae5ef6a28d66a192d399ad2530f1f2130b13186296dbb11bdef5b3d1"
1329dependencies = [ 1439dependencies = [
1440 "flatbuffers",
1330 "lru", 1441 "lru",
1331 "nostr 0.44.1", 1442 "nostr 0.44.1",
1332 "tokio", 1443 "tokio",
@@ -1342,6 +1453,21 @@ dependencies = [
1342] 1453]
1343 1454
1344[[package]] 1455[[package]]
1456name = "nostr-lmdb"
1457version = "0.44.0"
1458source = "registry+https://github.com/rust-lang/crates.io-index"
1459checksum = "1201bcf1f900c352f9f2cea5249960dc6b23049b65699a516e1327243becf6a2"
1460dependencies = [
1461 "async-utility",
1462 "flume",
1463 "heed",
1464 "nostr 0.44.1",
1465 "nostr-database 0.44.0",
1466 "tokio",
1467 "tracing",
1468]
1469
1470[[package]]
1345name = "nostr-relay-builder" 1471name = "nostr-relay-builder"
1346version = "0.44.0" 1472version = "0.44.0"
1347source = "registry+https://github.com/rust-lang/crates.io-index" 1473source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1502,6 +1628,16 @@ dependencies = [
1502] 1628]
1503 1629
1504[[package]] 1630[[package]]
1631name = "page_size"
1632version = "0.6.0"
1633source = "registry+https://github.com/rust-lang/crates.io-index"
1634checksum = "30d5b2194ed13191c1999ae0704b7839fb18384fa22e49b57eeaa97d79ce40da"
1635dependencies = [
1636 "libc",
1637 "winapi",
1638]
1639
1640[[package]]
1505name = "parking_lot" 1641name = "parking_lot"
1506version = "0.12.5" 1642version = "0.12.5"
1507source = "registry+https://github.com/rust-lang/crates.io-index" 1643source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1552,6 +1688,48 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
1552checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" 1688checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220"
1553 1689
1554[[package]] 1690[[package]]
1691name = "phf"
1692version = "0.11.3"
1693source = "registry+https://github.com/rust-lang/crates.io-index"
1694checksum = "1fd6780a80ae0c52cc120a26a1a42c1ae51b247a253e4e06113d23d2c2edd078"
1695dependencies = [
1696 "phf_macros",
1697 "phf_shared",
1698]
1699
1700[[package]]
1701name = "phf_generator"
1702version = "0.11.3"
1703source = "registry+https://github.com/rust-lang/crates.io-index"
1704checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d"
1705dependencies = [
1706 "phf_shared",
1707 "rand 0.8.5",
1708]
1709
1710[[package]]
1711name = "phf_macros"
1712version = "0.11.3"
1713source = "registry+https://github.com/rust-lang/crates.io-index"
1714checksum = "f84ac04429c13a7ff43785d75ad27569f2951ce0ffd30a3321230db2fc727216"
1715dependencies = [
1716 "phf_generator",
1717 "phf_shared",
1718 "proc-macro2",
1719 "quote",
1720 "syn",
1721]
1722
1723[[package]]
1724name = "phf_shared"
1725version = "0.11.3"
1726source = "registry+https://github.com/rust-lang/crates.io-index"
1727checksum = "67eabc2ef2a60eb7faa00097bd1ffdb5bd28e62bf39990626a582201b7a754e5"
1728dependencies = [
1729 "siphasher",
1730]
1731
1732[[package]]
1555name = "pin-project-lite" 1733name = "pin-project-lite"
1556version = "0.2.16" 1734version = "0.2.16"
1557source = "registry+https://github.com/rust-lang/crates.io-index" 1735source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1774,6 +1952,15 @@ dependencies = [
1774] 1952]
1775 1953
1776[[package]] 1954[[package]]
1955name = "rustc_version"
1956version = "0.4.1"
1957source = "registry+https://github.com/rust-lang/crates.io-index"
1958checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92"
1959dependencies = [
1960 "semver",
1961]
1962
1963[[package]]
1777name = "rustix" 1964name = "rustix"
1778version = "1.1.2" 1965version = "1.1.2"
1779source = "registry+https://github.com/rust-lang/crates.io-index" 1966source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1921,6 +2108,12 @@ dependencies = [
1921] 2108]
1922 2109
1923[[package]] 2110[[package]]
2111name = "semver"
2112version = "1.0.27"
2113source = "registry+https://github.com/rust-lang/crates.io-index"
2114checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2"
2115
2116[[package]]
1924name = "serde" 2117name = "serde"
1925version = "1.0.228" 2118version = "1.0.228"
1926source = "registry+https://github.com/rust-lang/crates.io-index" 2119source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2028,6 +2221,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
2028checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" 2221checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe"
2029 2222
2030[[package]] 2223[[package]]
2224name = "siphasher"
2225version = "1.0.1"
2226source = "registry+https://github.com/rust-lang/crates.io-index"
2227checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d"
2228
2229[[package]]
2031name = "slab" 2230name = "slab"
2032version = "0.4.11" 2231version = "0.4.11"
2033source = "registry+https://github.com/rust-lang/crates.io-index" 2232source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2060,6 +2259,15 @@ dependencies = [
2060] 2259]
2061 2260
2062[[package]] 2261[[package]]
2262name = "spin"
2263version = "0.9.8"
2264source = "registry+https://github.com/rust-lang/crates.io-index"
2265checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67"
2266dependencies = [
2267 "lock_api",
2268]
2269
2270[[package]]
2063name = "stable_deref_trait" 2271name = "stable_deref_trait"
2064version = "1.2.1" 2272version = "1.2.1"
2065source = "registry+https://github.com/rust-lang/crates.io-index" 2273source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2095,6 +2303,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
2095checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" 2303checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160"
2096 2304
2097[[package]] 2305[[package]]
2306name = "synchronoise"
2307version = "1.0.1"
2308source = "registry+https://github.com/rust-lang/crates.io-index"
2309checksum = "3dbc01390fc626ce8d1cffe3376ded2b72a11bb70e1c75f404a210e4daa4def2"
2310dependencies = [
2311 "crossbeam-queue",
2312]
2313
2314[[package]]
2098name = "synstructure" 2315name = "synstructure"
2099version = "0.13.2" 2316version = "0.13.2"
2100source = "registry+https://github.com/rust-lang/crates.io-index" 2317source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2625,6 +2842,28 @@ dependencies = [
2625] 2842]
2626 2843
2627[[package]] 2844[[package]]
2845name = "winapi"
2846version = "0.3.9"
2847source = "registry+https://github.com/rust-lang/crates.io-index"
2848checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
2849dependencies = [
2850 "winapi-i686-pc-windows-gnu",
2851 "winapi-x86_64-pc-windows-gnu",
2852]
2853
2854[[package]]
2855name = "winapi-i686-pc-windows-gnu"
2856version = "0.4.0"
2857source = "registry+https://github.com/rust-lang/crates.io-index"
2858checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
2859
2860[[package]]
2861name = "winapi-x86_64-pc-windows-gnu"
2862version = "0.4.0"
2863source = "registry+https://github.com/rust-lang/crates.io-index"
2864checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
2865
2866[[package]]
2628name = "windows-core" 2867name = "windows-core"
2629version = "0.62.2" 2868version = "0.62.2"
2630source = "registry+https://github.com/rust-lang/crates.io-index" 2869source = "registry+https://github.com/rust-lang/crates.io-index"