split into workspace: poc-memory and poc-daemon subcrates
poc-daemon (notification routing, idle timer, IRC, Telegram) was already fully self-contained with no imports from the poc-memory library. Now it's a proper separate crate with its own Cargo.toml and capnp schema. poc-memory retains the store, graph, search, neuro, knowledge, and the jobkit-based memory maintenance daemon (daemon.rs). Co-Authored-By: ProofOfConcept <poc@bcachefs.org>
This commit is contained in:
parent
488fd5a0aa
commit
fc48ac7c7f
53 changed files with 108 additions and 76 deletions
38
Cargo.lock
generated
38
Cargo.lock
generated
|
|
@ -1698,27 +1698,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
|
checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "poc-memory"
|
name = "poc-daemon"
|
||||||
version = "0.4.0"
|
version = "0.4.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bincode",
|
|
||||||
"capnp",
|
"capnp",
|
||||||
"capnp-rpc",
|
"capnp-rpc",
|
||||||
"capnpc",
|
"capnpc",
|
||||||
"chrono",
|
"chrono",
|
||||||
"clap",
|
"clap",
|
||||||
"faer",
|
|
||||||
"futures",
|
"futures",
|
||||||
"jobkit",
|
|
||||||
"libc",
|
|
||||||
"log",
|
|
||||||
"memmap2",
|
|
||||||
"paste",
|
|
||||||
"peg",
|
|
||||||
"rayon",
|
|
||||||
"regex",
|
|
||||||
"reqwest",
|
"reqwest",
|
||||||
"rkyv",
|
|
||||||
"rustls",
|
"rustls",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
|
|
@ -1729,10 +1718,33 @@ dependencies = [
|
||||||
"tracing",
|
"tracing",
|
||||||
"tracing-appender",
|
"tracing-appender",
|
||||||
"tracing-subscriber",
|
"tracing-subscriber",
|
||||||
"uuid",
|
|
||||||
"webpki-roots",
|
"webpki-roots",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "poc-memory"
|
||||||
|
version = "0.4.0"
|
||||||
|
dependencies = [
|
||||||
|
"bincode",
|
||||||
|
"capnp",
|
||||||
|
"capnpc",
|
||||||
|
"chrono",
|
||||||
|
"clap",
|
||||||
|
"faer",
|
||||||
|
"jobkit",
|
||||||
|
"libc",
|
||||||
|
"log",
|
||||||
|
"memmap2",
|
||||||
|
"paste",
|
||||||
|
"peg",
|
||||||
|
"rayon",
|
||||||
|
"regex",
|
||||||
|
"rkyv",
|
||||||
|
"serde",
|
||||||
|
"serde_json",
|
||||||
|
"uuid",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "potential_utf"
|
name = "potential_utf"
|
||||||
version = "0.1.4"
|
version = "0.1.4"
|
||||||
|
|
|
||||||
63
Cargo.toml
63
Cargo.toml
|
|
@ -1,63 +1,10 @@
|
||||||
[package]
|
[workspace]
|
||||||
name = "poc-memory"
|
members = ["poc-memory", "poc-daemon"]
|
||||||
|
resolver = "2"
|
||||||
|
|
||||||
|
[workspace.package]
|
||||||
version = "0.4.0"
|
version = "0.4.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[dependencies]
|
|
||||||
capnp = "0.20"
|
|
||||||
uuid = { version = "1", features = ["v4"] }
|
|
||||||
serde = { version = "1", features = ["derive"] }
|
|
||||||
serde_json = "1"
|
|
||||||
bincode = "1"
|
|
||||||
regex = "1"
|
|
||||||
chrono = "0.4"
|
|
||||||
clap = { version = "4", features = ["derive"] }
|
|
||||||
libc = "0.2"
|
|
||||||
faer = "0.24.0"
|
|
||||||
rkyv = { version = "0.7", features = ["validation", "std"] }
|
|
||||||
memmap2 = "0.9"
|
|
||||||
rayon = "1"
|
|
||||||
peg = "0.8"
|
|
||||||
paste = "1"
|
|
||||||
jobkit = { git = "https://evilpiepirate.org/git/jobkit.git/" }
|
|
||||||
log = "0.4"
|
|
||||||
|
|
||||||
# poc-daemon deps
|
|
||||||
capnp-rpc = "0.20"
|
|
||||||
futures = "0.3"
|
|
||||||
tokio = { version = "1", features = ["full"] }
|
|
||||||
tokio-util = { version = "0.7", features = ["compat"] }
|
|
||||||
toml = "0.8"
|
|
||||||
tokio-rustls = "0.26"
|
|
||||||
rustls = { version = "0.23", default-features = false, features = ["ring", "logging", "std", "tls12"] }
|
|
||||||
webpki-roots = "1"
|
|
||||||
tracing = "0.1"
|
|
||||||
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|
|
||||||
tracing-appender = "0.2"
|
|
||||||
reqwest = { version = "0.12", default-features = false, features = ["rustls-tls-webpki-roots", "json"] }
|
|
||||||
|
|
||||||
[build-dependencies]
|
|
||||||
capnpc = "0.20"
|
|
||||||
|
|
||||||
[lib]
|
|
||||||
name = "poc_memory"
|
|
||||||
path = "src/lib.rs"
|
|
||||||
|
|
||||||
[[bin]]
|
|
||||||
name = "poc-memory"
|
|
||||||
path = "src/main.rs"
|
|
||||||
|
|
||||||
[[bin]]
|
|
||||||
name = "memory-search"
|
|
||||||
path = "src/bin/memory-search.rs"
|
|
||||||
|
|
||||||
[[bin]]
|
|
||||||
name = "poc-daemon"
|
|
||||||
path = "src/bin/poc-daemon/main.rs"
|
|
||||||
|
|
||||||
[[bin]]
|
|
||||||
name = "poc-hook"
|
|
||||||
path = "src/bin/poc-hook.rs"
|
|
||||||
|
|
||||||
[profile.release]
|
[profile.release]
|
||||||
opt-level = 2
|
opt-level = 2
|
||||||
|
|
|
||||||
30
poc-daemon/Cargo.toml
Normal file
30
poc-daemon/Cargo.toml
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
[package]
|
||||||
|
name = "poc-daemon"
|
||||||
|
version.workspace = true
|
||||||
|
edition.workspace = true
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
capnp = "0.20"
|
||||||
|
capnp-rpc = "0.20"
|
||||||
|
clap = { version = "4", features = ["derive"] }
|
||||||
|
futures = "0.3"
|
||||||
|
tokio = { version = "1", features = ["full"] }
|
||||||
|
tokio-util = { version = "0.7", features = ["compat"] }
|
||||||
|
toml = "0.8"
|
||||||
|
tokio-rustls = "0.26"
|
||||||
|
rustls = { version = "0.23", default-features = false, features = ["ring", "logging", "std", "tls12"] }
|
||||||
|
webpki-roots = "1"
|
||||||
|
tracing = "0.1"
|
||||||
|
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|
||||||
|
tracing-appender = "0.2"
|
||||||
|
reqwest = { version = "0.12", default-features = false, features = ["rustls-tls-webpki-roots", "json"] }
|
||||||
|
serde = { version = "1", features = ["derive"] }
|
||||||
|
serde_json = "1"
|
||||||
|
chrono = "0.4"
|
||||||
|
|
||||||
|
[build-dependencies]
|
||||||
|
capnpc = "0.20"
|
||||||
|
|
||||||
|
[[bin]]
|
||||||
|
name = "poc-daemon"
|
||||||
|
path = "src/main.rs"
|
||||||
|
|
@ -1,9 +1,4 @@
|
||||||
fn main() {
|
fn main() {
|
||||||
capnpc::CompilerCommand::new()
|
|
||||||
.file("schema/memory.capnp")
|
|
||||||
.run()
|
|
||||||
.expect("capnp compile failed");
|
|
||||||
|
|
||||||
capnpc::CompilerCommand::new()
|
capnpc::CompilerCommand::new()
|
||||||
.file("schema/daemon.capnp")
|
.file("schema/daemon.capnp")
|
||||||
.run()
|
.run()
|
||||||
42
poc-memory/Cargo.toml
Normal file
42
poc-memory/Cargo.toml
Normal file
|
|
@ -0,0 +1,42 @@
|
||||||
|
[package]
|
||||||
|
name = "poc-memory"
|
||||||
|
version.workspace = true
|
||||||
|
edition.workspace = true
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
capnp = "0.20"
|
||||||
|
uuid = { version = "1", features = ["v4"] }
|
||||||
|
serde = { version = "1", features = ["derive"] }
|
||||||
|
serde_json = "1"
|
||||||
|
bincode = "1"
|
||||||
|
regex = "1"
|
||||||
|
chrono = "0.4"
|
||||||
|
clap = { version = "4", features = ["derive"] }
|
||||||
|
libc = "0.2"
|
||||||
|
faer = "0.24.0"
|
||||||
|
rkyv = { version = "0.7", features = ["validation", "std"] }
|
||||||
|
memmap2 = "0.9"
|
||||||
|
rayon = "1"
|
||||||
|
peg = "0.8"
|
||||||
|
paste = "1"
|
||||||
|
jobkit = { git = "https://evilpiepirate.org/git/jobkit.git/" }
|
||||||
|
log = "0.4"
|
||||||
|
|
||||||
|
[build-dependencies]
|
||||||
|
capnpc = "0.20"
|
||||||
|
|
||||||
|
[lib]
|
||||||
|
name = "poc_memory"
|
||||||
|
path = "src/lib.rs"
|
||||||
|
|
||||||
|
[[bin]]
|
||||||
|
name = "poc-memory"
|
||||||
|
path = "src/main.rs"
|
||||||
|
|
||||||
|
[[bin]]
|
||||||
|
name = "memory-search"
|
||||||
|
path = "src/bin/memory-search.rs"
|
||||||
|
|
||||||
|
[[bin]]
|
||||||
|
name = "poc-hook"
|
||||||
|
path = "src/bin/poc-hook.rs"
|
||||||
6
poc-memory/build.rs
Normal file
6
poc-memory/build.rs
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
fn main() {
|
||||||
|
capnpc::CompilerCommand::new()
|
||||||
|
.file("schema/memory.capnp")
|
||||||
|
.run()
|
||||||
|
.expect("capnp compile failed");
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue