mv lib-sqlite to rust-lib

This commit is contained in:
appflowy 2021-12-20 14:26:26 +08:00
parent 16c702b1e1
commit ef491f4276
14 changed files with 5 additions and 162 deletions

View File

@ -2,6 +2,7 @@
members = [ members = [
"lib-dispatch", "lib-dispatch",
"lib-log", "lib-log",
"lib-sqlite",
"flowy-net", "flowy-net",
"flowy-sdk", "flowy-sdk",
"dart-ffi", "dart-ffi",
@ -14,7 +15,5 @@ members = [
"flowy-error", "flowy-error",
] ]
exclude = ["../backend"]
[profile.dev] [profile.dev]
split-debuginfo = "unpacked" split-debuginfo = "unpacked"

View File

@ -10,7 +10,6 @@ flowy-core-data-model = { path = "../../../shared-lib/flowy-core-data-model" }
flowy-collaboration = { path = "../../../shared-lib/flowy-collaboration" } flowy-collaboration = { path = "../../../shared-lib/flowy-collaboration" }
flowy-derive = { path = "../../../shared-lib/flowy-derive" } flowy-derive = { path = "../../../shared-lib/flowy-derive" }
lib-ot = { path = "../../../shared-lib/lib-ot" } lib-ot = { path = "../../../shared-lib/lib-ot" }
lib-sqlite = { path = "../../../shared-lib/lib-sqlite" }
backend-service = { path = "../../../shared-lib/backend-service" } backend-service = { path = "../../../shared-lib/backend-service" }
lib-infra = { path = "../../../shared-lib/lib-infra" } lib-infra = { path = "../../../shared-lib/lib-infra" }
@ -20,7 +19,7 @@ flowy-error = { path = "../flowy-error", features = ["db", "backend"]}
flowy-net = { path = "../flowy-net" } flowy-net = { path = "../flowy-net" }
dart-notify = { path = "../dart-notify" } dart-notify = { path = "../dart-notify" }
lib-dispatch = { path = "../lib-dispatch" } lib-dispatch = { path = "../lib-dispatch" }
lib-sqlite = { path = "../lib-sqlite" }
parking_lot = "0.11" parking_lot = "0.11"
protobuf = {version = "2.18.0"} protobuf = {version = "2.18.0"}

View File

@ -9,6 +9,6 @@ edition = "2018"
diesel = {version = "1.4.8", features = ["sqlite"]} diesel = {version = "1.4.8", features = ["sqlite"]}
diesel_derives = {version = "1.4.1", features = ["sqlite"]} diesel_derives = {version = "1.4.1", features = ["sqlite"]}
diesel_migrations = {version = "1.4.0", features = ["sqlite"]} diesel_migrations = {version = "1.4.0", features = ["sqlite"]}
lib-sqlite = { path = "../../../shared-lib/lib-sqlite" } lib-sqlite = { path = "../lib-sqlite" }
log = "0.4" log = "0.4"
lazy_static = "1.4.0" lazy_static = "1.4.0"

View File

@ -18,8 +18,8 @@ lib-ot = { path = "../../../shared-lib/lib-ot", optional = true}
serde_json = {version = "1.0", optional = true} serde_json = {version = "1.0", optional = true}
backend-service = { path = "../../../shared-lib/backend-service", optional = true} backend-service = { path = "../../../shared-lib/backend-service", optional = true}
flowy-database = { path = "../flowy-database", optional = true} flowy-database = { path = "../flowy-database", optional = true}
lib-sqlite = { path = "../../../shared-lib/lib-sqlite", optional = true}
r2d2 = { version = "0.8", optional = true} r2d2 = { version = "0.8", optional = true}
lib-sqlite = { path = "../lib-sqlite", optional = true }
[features] [features]
collaboration = ["flowy-collaboration"] collaboration = ["flowy-collaboration"]

View File

@ -9,9 +9,7 @@ edition = "2018"
flowy-user-data-model = { path = "../../../shared-lib/flowy-user-data-model" } flowy-user-data-model = { path = "../../../shared-lib/flowy-user-data-model" }
backend-service = { path = "../../../shared-lib/backend-service" } backend-service = { path = "../../../shared-lib/backend-service" }
flowy-derive = { path = "../../../shared-lib/flowy-derive" } flowy-derive = { path = "../../../shared-lib/flowy-derive" }
lib-sqlite = { path = "../../../shared-lib/lib-sqlite" }
lib-infra = { path = "../../../shared-lib/lib-infra" } lib-infra = { path = "../../../shared-lib/lib-infra" }
flowy-collaboration = { path = "../../../shared-lib/flowy-collaboration", optional = true} flowy-collaboration = { path = "../../../shared-lib/flowy-collaboration", optional = true}
derive_more = {version = "0.99", features = ["display"]} derive_more = {version = "0.99", features = ["display"]}
@ -20,6 +18,7 @@ flowy-net = { path = "../flowy-net" }
dart-notify = { path = "../dart-notify" } dart-notify = { path = "../dart-notify" }
lib-dispatch = { path = "../lib-dispatch" } lib-dispatch = { path = "../lib-dispatch" }
flowy-error = { path = "../flowy-error", features = ["db", "backend"] } flowy-error = { path = "../flowy-error", features = ["db", "backend"] }
lib-sqlite = { path = "../lib-sqlite" }
tracing = { version = "0.1", features = ["log"] } tracing = { version = "0.1", features = ["log"] }

153
shared-lib/Cargo.lock generated
View File

@ -185,15 +185,6 @@ dependencies = [
"syn", "syn",
] ]
[[package]]
name = "addr2line"
version = "0.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b9ecd88a8c8378ca913a680cd98f0f13ac67383d35993f86c90a70e3f137816b"
dependencies = [
"gimli",
]
[[package]] [[package]]
name = "adler" name = "adler"
version = "1.0.2" version = "1.0.2"
@ -297,21 +288,6 @@ dependencies = [
"uuid", "uuid",
] ]
[[package]]
name = "backtrace"
version = "0.3.63"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "321629d8ba6513061f26707241fa9bc89524ff1cd7a915a97ef0c62c666ce1b6"
dependencies = [
"addr2line",
"cc",
"cfg-if",
"libc",
"miniz_oxide",
"object",
"rustc-demangle",
]
[[package]] [[package]]
name = "base-x" name = "base-x"
version = "0.2.8" version = "0.2.8"
@ -539,38 +515,6 @@ dependencies = [
"syn", "syn",
] ]
[[package]]
name = "diesel"
version = "1.4.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b28135ecf6b7d446b43e27e225622a038cc4e2930a1022f51cdb97ada19b8e4d"
dependencies = [
"byteorder",
"diesel_derives",
"libsqlite3-sys",
]
[[package]]
name = "diesel_derives"
version = "1.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "45f5098f628d02a7a0f68ddba586fb61e80edec3bdc1be3b921f4ceec60858d3"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "diesel_migrations"
version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bf3cde8413353dc7f5d72fa8ce0b99a560a359d2c5ef1e5817ca731cd9008f4c"
dependencies = [
"migrations_internals",
"migrations_macros",
]
[[package]] [[package]]
name = "digest" name = "digest"
version = "0.9.0" version = "0.9.0"
@ -624,15 +568,6 @@ dependencies = [
"termcolor", "termcolor",
] ]
[[package]]
name = "error-chain"
version = "0.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "07e791d3be96241c77c43846b665ef1384606da2cd2a48730abe606a12906e02"
dependencies = [
"backtrace",
]
[[package]] [[package]]
name = "error-code" name = "error-code"
version = "0.1.0" version = "0.1.0"
@ -922,12 +857,6 @@ dependencies = [
"wasi 0.10.0+wasi-snapshot-preview1", "wasi 0.10.0+wasi-snapshot-preview1",
] ]
[[package]]
name = "gimli"
version = "0.26.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "78cc372d058dcf6d5ecd98510e7fbc9e5aec4d21de70f65fea8fecebcd881bd4"
[[package]] [[package]]
name = "glob" name = "glob"
version = "0.3.0" version = "0.3.0"
@ -1174,21 +1103,6 @@ dependencies = [
"tracing", "tracing",
] ]
[[package]]
name = "lib-sqlite"
version = "0.1.0"
dependencies = [
"diesel",
"diesel_derives",
"diesel_migrations",
"error-chain",
"lazy_static",
"libsqlite3-sys",
"log",
"r2d2",
"scheduled-thread-pool",
]
[[package]] [[package]]
name = "lib-ws" name = "lib-ws"
version = "0.1.0" version = "0.1.0"
@ -1222,17 +1136,6 @@ version = "0.2.107"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fbe5e23404da5b4f555ef85ebed98fb4083e55a00c317800bc2a50ede9f3d219" checksum = "fbe5e23404da5b4f555ef85ebed98fb4083e55a00c317800bc2a50ede9f3d219"
[[package]]
name = "libsqlite3-sys"
version = "0.22.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "290b64917f8b0cb885d9de0f9959fe1f775d7fa12f1da2db9001c1c8ab60f89d"
dependencies = [
"cc",
"pkg-config",
"vcpkg",
]
[[package]] [[package]]
name = "linked-hash-map" name = "linked-hash-map"
version = "0.5.4" version = "0.5.4"
@ -1293,27 +1196,6 @@ version = "2.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a"
[[package]]
name = "migrations_internals"
version = "1.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2b4fc84e4af020b837029e017966f86a1c2d5e83e64b589963d5047525995860"
dependencies = [
"diesel",
]
[[package]]
name = "migrations_macros"
version = "1.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9753f12909fd8d923f75ae5c3258cae1ed3c8ec052e1b38c93c21a6d157f789c"
dependencies = [
"migrations_internals",
"proc-macro2",
"quote",
"syn",
]
[[package]] [[package]]
name = "mime" name = "mime"
version = "0.3.16" version = "0.3.16"
@ -1419,15 +1301,6 @@ dependencies = [
"libc", "libc",
] ]
[[package]]
name = "object"
version = "0.27.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "67ac1d3f9a1d3616fd9a60c8d74296f22406a238b6a72f5cc1e6f314df4ffbf9"
dependencies = [
"memchr",
]
[[package]] [[package]]
name = "once_cell" name = "once_cell"
version = "1.8.0" version = "1.8.0"
@ -1622,17 +1495,6 @@ dependencies = [
"proc-macro2", "proc-macro2",
] ]
[[package]]
name = "r2d2"
version = "0.8.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "545c5bc2b880973c9c10e4067418407a0ccaa3091781d1671d46eb35107cb26f"
dependencies = [
"log",
"parking_lot",
"scheduled-thread-pool",
]
[[package]] [[package]]
name = "rand" name = "rand"
version = "0.7.3" version = "0.7.3"
@ -1784,12 +1646,6 @@ dependencies = [
"winreg", "winreg",
] ]
[[package]]
name = "rustc-demangle"
version = "0.1.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342"
[[package]] [[package]]
name = "rustc_version" name = "rustc_version"
version = "0.2.3" version = "0.2.3"
@ -1824,15 +1680,6 @@ dependencies = [
"winapi", "winapi",
] ]
[[package]]
name = "scheduled-thread-pool"
version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dc6f74fd1204073fa02d5d5d68bec8021be4c38690b61264b2fdb48083d0e7d7"
dependencies = [
"parking_lot",
]
[[package]] [[package]]
name = "scopeguard" name = "scopeguard"
version = "1.1.0" version = "1.1.0"

View File

@ -5,7 +5,6 @@ members = [
"flowy-collaboration", "flowy-collaboration",
"lib-ot", "lib-ot",
"lib-ws", "lib-ws",
"lib-sqlite",
"lib-infra", "lib-infra",
"backend-service", "backend-service",
"flowy-derive", "flowy-derive",