nodeinfo
: Add basics
This commit is contained in:
parent
7bc09aaed4
commit
1d4f190630
4 changed files with 10 additions and 14 deletions
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
[submodule "acrate-nodeinfo/nodeinfo"]
|
||||
path = acrate-nodeinfo/spec
|
||||
url = https://github.com/jhass/nodeinfo.git
|
|
@ -4,7 +4,10 @@ version = "0.1.0"
|
|||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
acrate-hostmeta = { version = "0.1.0", path = "../acrate-hostmeta" }
|
||||
log = "0.4.22"
|
||||
reqwest = { version = "0.12.9", features = ["json", "stream"] }
|
||||
serde = { version = "1.0.214", features = ["derive"] }
|
||||
|
||||
[dev-dependencies]
|
||||
pretty_env_logger = "0.5.0"
|
||||
|
|
1
acrate-nodeinfo/spec
Submodule
1
acrate-nodeinfo/spec
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 1ad645d23cce892dbb6fbaf349760dfb0f1aeaa1
|
|
@ -1,14 +1,3 @@
|
|||
pub fn add(left: u64, right: u64) -> u64 {
|
||||
left + right
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn it_works() {
|
||||
let result = add(2, 2);
|
||||
assert_eq!(result, 4);
|
||||
}
|
||||
}
|
||||
//! Serde-based [NodeInfo] parser.
|
||||
//!
|
||||
//! [NodeInfo]: https://github.com/jhass/nodeinfo/blob/main/PROTOCOL.md
|
||||
|
|
Loading…
Reference in a new issue