1
Fork 0

nodeinfo: Add basics

This commit is contained in:
Steffo 2024-11-11 03:20:48 +01:00
parent 7bc09aaed4
commit 1d4f190630
Signed by: steffo
GPG key ID: 5ADA3868646C3FC0
4 changed files with 10 additions and 14 deletions

3
.gitmodules vendored Normal file
View file

@ -0,0 +1,3 @@
[submodule "acrate-nodeinfo/nodeinfo"]
path = acrate-nodeinfo/spec
url = https://github.com/jhass/nodeinfo.git

View file

@ -4,7 +4,10 @@ version = "0.1.0"
edition = "2021" edition = "2021"
[dependencies] [dependencies]
acrate-hostmeta = { version = "0.1.0", path = "../acrate-hostmeta" }
log = "0.4.22" log = "0.4.22"
reqwest = { version = "0.12.9", features = ["json", "stream"] }
serde = { version = "1.0.214", features = ["derive"] }
[dev-dependencies] [dev-dependencies]
pretty_env_logger = "0.5.0" pretty_env_logger = "0.5.0"

1
acrate-nodeinfo/spec Submodule

@ -0,0 +1 @@
Subproject commit 1ad645d23cce892dbb6fbaf349760dfb0f1aeaa1

View file

@ -1,14 +1,3 @@
pub fn add(left: u64, right: u64) -> u64 { //! Serde-based [NodeInfo] parser.
left + right //!
} //! [NodeInfo]: https://github.com/jhass/nodeinfo/blob/main/PROTOCOL.md
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn it_works() {
let result = add(2, 2);
assert_eq!(result, 4);
}
}