Replace 130 lines of manual field-by-field capnp serialization with two declarative macros: capnp_enum! — generates to_capnp/from_capnp for enum types capnp_message! — generates from_capnp/to_capnp for structs Adding a field to the capnp schema now means adding it in one place; both read and write directions are generated from the same declaration. Eliminates: read_content_node, write_content_node, read_relation, write_relation, read_provenance (5 functions → 2 macro invocations). Callers updated to method syntax: Node::from_capnp() / node.to_capnp(). Co-Authored-By: Kent Overstreet <kent.overstreet@linux.dev>
34 lines
574 B
TOML
34 lines
574 B
TOML
[package]
|
|
name = "poc-memory"
|
|
version = "0.4.0"
|
|
edition = "2021"
|
|
|
|
[dependencies]
|
|
capnp = "0.20"
|
|
uuid = { version = "1", features = ["v4"] }
|
|
serde = { version = "1", features = ["derive"] }
|
|
serde_json = "1"
|
|
bincode = "1"
|
|
regex = "1"
|
|
libc = "0.2"
|
|
faer = "0.24.0"
|
|
rkyv = { version = "0.7", features = ["validation", "std"] }
|
|
memmap2 = "0.9"
|
|
rayon = "1"
|
|
peg = "0.8"
|
|
paste = "1"
|
|
|
|
[build-dependencies]
|
|
capnpc = "0.20"
|
|
|
|
[[bin]]
|
|
name = "poc-memory"
|
|
path = "src/main.rs"
|
|
|
|
[[bin]]
|
|
name = "memory-search"
|
|
path = "src/bin/memory-search.rs"
|
|
|
|
[profile.release]
|
|
opt-level = 2
|
|
strip = true
|