update kinode_process_lib to 0.5.7

This commit is contained in:
dr-frmr 2024-02-01 16:59:38 -03:00
parent 6e11c37164
commit 3c83e8b83d
No known key found for this signature in database
35 changed files with 129 additions and 72 deletions

View File

@ -1066,7 +1066,7 @@ dependencies = [
[[package]]
name = "kinode_process_lib"
version = "0.5.7"
source = "git+https://github.com/uqbar-dao/process_lib?rev=ea5e303#ea5e3030369065c4b1d25dd0ba01e6d966ec7883"
source = "git+https://github.com/uqbar-dao/process_lib?tag=v0.5.7-alpha#c1ac7227951fbd8cabf6568704f0ce11e8558c8a"
dependencies = [
"alloy-rpc-types",
"anyhow",

View File

@ -14,7 +14,7 @@ alloy-rpc-types = { git = "https://github.com/alloy-rs/alloy.git", rev = "3b1c31
alloy-sol-types = "0.5.1"
anyhow = "1.0"
bincode = "1.3.3"
kinode_process_lib = { git = "https://github.com/uqbar-dao/process_lib", rev = "ea5e303", features = ["eth"] }
kinode_process_lib = { git = "https://github.com/uqbar-dao/process_lib", tag = "v0.5.7-alpha", features = ["eth"] }
rand = "0.8"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"

View File

@ -139,8 +139,8 @@ checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c"
[[package]]
name = "kinode_process_lib"
version = "0.5.5"
source = "git+https://github.com/kinode-dao/process_lib?rev=329c7a8#329c7a8314973c857db38c7b712318de9349eb6e"
version = "0.5.7"
source = "git+https://github.com/kinode-dao/process_lib?tag=v0.5.7-alpha#c1ac7227951fbd8cabf6568704f0ce11e8558c8a"
dependencies = [
"anyhow",
"bincode",

View File

@ -10,7 +10,7 @@ lto = true
[dependencies]
anyhow = "1.0"
kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "329c7a8" }
kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.5.7-alpha" }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
wit-bindgen = { git = "https://github.com/bytecodealliance/wit-bindgen", rev = "efcc759" }

View File

@ -141,8 +141,8 @@ checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c"
[[package]]
name = "kinode_process_lib"
version = "0.5.5"
source = "git+https://github.com/kinode-dao/process_lib?tag=v0.5.5-alpha#722f2dbfbcc4d1bf5da1fa5db137632a3cede44c"
version = "0.5.7"
source = "git+https://github.com/kinode-dao/process_lib?tag=v0.5.7-alpha#c1ac7227951fbd8cabf6568704f0ce11e8558c8a"
dependencies = [
"anyhow",
"bincode",

View File

@ -13,7 +13,7 @@ lto = true
[dependencies]
anyhow = "1.0"
bincode = "1.3.3"
kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.5.5-alpha" }
kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.5.7-alpha" }
rand = "0.8"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"

View File

@ -139,8 +139,8 @@ checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c"
[[package]]
name = "kinode_process_lib"
version = "0.5.5"
source = "git+https://github.com/kinode-dao/process_lib?rev=329c7a8#329c7a8314973c857db38c7b712318de9349eb6e"
version = "0.5.7"
source = "git+https://github.com/kinode-dao/process_lib?tag=v0.5.7-alpha#c1ac7227951fbd8cabf6568704f0ce11e8558c8a"
dependencies = [
"anyhow",
"bincode",

View File

@ -10,7 +10,7 @@ lto = true
[dependencies]
anyhow = "1.0"
kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "329c7a8" }
kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.5.7-alpha" }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
wit-bindgen = { git = "https://github.com/bytecodealliance/wit-bindgen", rev = "efcc759" }

View File

@ -128,8 +128,8 @@ checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c"
[[package]]
name = "kinode_process_lib"
version = "0.5.5"
source = "git+https://github.com/kinode-dao/process_lib?rev=329c7a8#329c7a8314973c857db38c7b712318de9349eb6e"
version = "0.5.7"
source = "git+https://github.com/kinode-dao/process_lib?tag=v0.5.7-alpha#c1ac7227951fbd8cabf6568704f0ce11e8558c8a"
dependencies = [
"anyhow",
"bincode",

View File

@ -10,7 +10,7 @@ lto = true
[dependencies]
anyhow = "1.0"
kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "329c7a8" }
kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.5.7-alpha" }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
wit-bindgen = { git = "https://github.com/bytecodealliance/wit-bindgen", rev = "efcc759" }

View File

@ -230,8 +230,8 @@ checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c"
[[package]]
name = "kinode_process_lib"
version = "0.5.5"
source = "git+https://github.com/kinode-dao/process_lib?tag=v0.5.5-alpha#722f2dbfbcc4d1bf5da1fa5db137632a3cede44c"
version = "0.5.7"
source = "git+https://github.com/kinode-dao/process_lib?tag=v0.5.7-alpha#c1ac7227951fbd8cabf6568704f0ce11e8558c8a"
dependencies = [
"anyhow",
"bincode",

View File

@ -12,7 +12,7 @@ lto = true
anyhow = "1.0"
base64 = "0.13"
bincode = "1.3.3"
kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.5.5-alpha" }
kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.5.7-alpha" }
pleco = "0.5"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"

View File

@ -111,7 +111,8 @@ fn initialize(our: Address) {
println!("{}: started", our.package());
// Serve the index.html and other UI files found in pkg/ui at the root path.
http::serve_ui(&our, "ui").unwrap();
// authenticated=true, local_only=false
http::serve_ui(&our, "ui", true, false, vec!["/"]).unwrap();
// Allow HTTP requests to be made to /games; they will be handled dynamically.
http::bind_http_path("/games", true, false).unwrap();
@ -183,12 +184,12 @@ fn handle_request(our: &Address, message: &Message, state: &mut ChessState) -> a
match handle_http_request(our, state, incoming) {
Ok(()) => Ok(()),
Err(e) => {
println!("chess: error handling http request: {:?}", e);
http::send_response(
http::StatusCode::SERVICE_UNAVAILABLE,
None,
"Service Unavailable".to_string().as_bytes().to_vec(),
)
);
Err(anyhow::anyhow!("chess: error handling http request: {e:?}"))
}
}
}
@ -419,35 +420,48 @@ fn handle_http_request(
http_request: &http::IncomingHttpRequest,
) -> anyhow::Result<()> {
if http_request.path()? != "/games" {
return http::send_response(
http::send_response(
http::StatusCode::NOT_FOUND,
None,
"Not Found".to_string().as_bytes().to_vec(),
);
return Ok(());
}
match http_request.method()?.as_str() {
// on GET: give the frontend all of our active games
"GET" => http::send_response(
"GET" => Ok(http::send_response(
http::StatusCode::OK,
Some(HashMap::from([(
String::from("Content-Type"),
String::from("application/json"),
)])),
serde_json::to_vec(&state.games)?,
),
)),
// on POST: create a new game
"POST" => {
let Some(blob) = get_blob() else {
return http::send_response(http::StatusCode::BAD_REQUEST, None, vec![]);
return Ok(http::send_response(
http::StatusCode::BAD_REQUEST,
None,
vec![],
));
};
let blob_json = serde_json::from_slice::<serde_json::Value>(&blob.bytes)?;
let Some(game_id) = blob_json["id"].as_str() else {
return http::send_response(http::StatusCode::BAD_REQUEST, None, vec![]);
return Ok(http::send_response(
http::StatusCode::BAD_REQUEST,
None,
vec![],
));
};
if let Some(game) = state.games.get(game_id)
&& !game.ended
{
return http::send_response(http::StatusCode::CONFLICT, None, vec![]);
return Ok(http::send_response(
http::StatusCode::CONFLICT,
None,
vec![],
));
};
let player_white = blob_json["white"]
@ -495,34 +509,63 @@ fn handle_http_request(
String::from("application/json"),
)])),
body,
)
);
Ok(())
}
// on PUT: make a move
"PUT" => {
let Some(blob) = get_blob() else {
return http::send_response(http::StatusCode::BAD_REQUEST, None, vec![]);
return Ok(http::send_response(
http::StatusCode::BAD_REQUEST,
None,
vec![],
));
};
let blob_json = serde_json::from_slice::<serde_json::Value>(&blob.bytes)?;
let Some(game_id) = blob_json["id"].as_str() else {
return http::send_response(http::StatusCode::BAD_REQUEST, None, vec![]);
return Ok(http::send_response(
http::StatusCode::BAD_REQUEST,
None,
vec![],
));
};
let Some(game) = state.games.get_mut(game_id) else {
return http::send_response(http::StatusCode::NOT_FOUND, None, vec![]);
return Ok(http::send_response(
http::StatusCode::NOT_FOUND,
None,
vec![],
));
};
if (game.turns % 2 == 0 && game.white != our.node)
|| (game.turns % 2 == 1 && game.black != our.node)
{
return http::send_response(http::StatusCode::FORBIDDEN, None, vec![]);
return Ok(http::send_response(
http::StatusCode::FORBIDDEN,
None,
vec![],
));
} else if game.ended {
return http::send_response(http::StatusCode::CONFLICT, None, vec![]);
return Ok(http::send_response(
http::StatusCode::CONFLICT,
None,
vec![],
));
}
let Some(move_str) = blob_json["move"].as_str() else {
return http::send_response(http::StatusCode::BAD_REQUEST, None, vec![]);
return Ok(http::send_response(
http::StatusCode::BAD_REQUEST,
None,
vec![],
));
};
let mut board = Board::from_fen(&game.board).unwrap();
if !board.apply_uci_move(move_str) {
// TODO surface illegal move to player or something here
return http::send_response(http::StatusCode::BAD_REQUEST, None, vec![]);
return Ok(http::send_response(
http::StatusCode::BAD_REQUEST,
None,
vec![],
));
}
// send the move to the other player
// check if the game is over
@ -559,15 +602,24 @@ fn handle_http_request(
String::from("application/json"),
)])),
body,
)
);
Ok(())
}
// on DELETE: end the game
"DELETE" => {
let Some(game_id) = http_request.query_params().get("id") else {
return http::send_response(http::StatusCode::BAD_REQUEST, None, vec![]);
return Ok(http::send_response(
http::StatusCode::BAD_REQUEST,
None,
vec![],
));
};
let Some(game) = state.games.get_mut(game_id) else {
return http::send_response(http::StatusCode::BAD_REQUEST, None, vec![]);
return Ok(http::send_response(
http::StatusCode::BAD_REQUEST,
None,
vec![],
));
};
// send the other player an end game request
Request::new()
@ -584,9 +636,14 @@ fn handle_http_request(
String::from("application/json"),
)])),
body,
)
);
Ok(())
}
// Any other method will be rejected.
_ => http::send_response(http::StatusCode::METHOD_NOT_ALLOWED, None, vec![]),
_ => Ok(http::send_response(
http::StatusCode::METHOD_NOT_ALLOWED,
None,
vec![],
)),
}
}

View File

@ -140,8 +140,8 @@ checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c"
[[package]]
name = "kinode_process_lib"
version = "0.5.5"
source = "git+https://github.com/kinode-dao/process_lib?tag=v0.5.5-alpha#722f2dbfbcc4d1bf5da1fa5db137632a3cede44c"
version = "0.5.7"
source = "git+https://github.com/kinode-dao/process_lib?tag=v0.5.7-alpha#c1ac7227951fbd8cabf6568704f0ce11e8558c8a"
dependencies = [
"anyhow",
"bincode",

View File

@ -13,7 +13,7 @@ lto = true
[dependencies]
anyhow = "1.0"
bincode = "1.3.3"
kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.5.5-alpha" }
kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.5.7-alpha" }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
wit-bindgen = { git = "https://github.com/bytecodealliance/wit-bindgen", rev = "efcc759" }

View File

@ -1047,8 +1047,8 @@ dependencies = [
[[package]]
name = "kinode_process_lib"
version = "0.5.5"
source = "git+https://github.com/kinode-dao/process_lib?tag=v0.5.5-alpha#722f2dbfbcc4d1bf5da1fa5db137632a3cede44c"
version = "0.5.7"
source = "git+https://github.com/kinode-dao/process_lib?tag=v0.5.7-alpha#c1ac7227951fbd8cabf6568704f0ce11e8558c8a"
dependencies = [
"alloy-rpc-types",
"anyhow",

View File

@ -17,7 +17,7 @@ alloy-rpc-types = { git = "https://github.com/alloy-rs/alloy.git", rev = "3b1c31
alloy-sol-types = "0.5.1"
bincode = "1.3.3"
hex = "0.4.3"
kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.5.5-alpha", features = ["eth"] }
kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.5.7-alpha", features = ["eth"] }
rmp-serde = "1.1.2"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"

View File

@ -139,8 +139,8 @@ checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c"
[[package]]
name = "kinode_process_lib"
version = "0.5.5"
source = "git+https://github.com/kinode-dao/process_lib?rev=329c7a8#329c7a8314973c857db38c7b712318de9349eb6e"
version = "0.5.7"
source = "git+https://github.com/kinode-dao/process_lib?tag=v0.5.7-alpha#c1ac7227951fbd8cabf6568704f0ce11e8558c8a"
dependencies = [
"anyhow",
"bincode",

View File

@ -10,7 +10,7 @@ lto = true
[dependencies]
anyhow = "1.0"
kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "329c7a8" }
kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.5.7-alpha" }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
wit-bindgen = { git = "https://github.com/bytecodealliance/wit-bindgen", rev = "efcc759" }

View File

@ -139,8 +139,8 @@ checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c"
[[package]]
name = "kinode_process_lib"
version = "0.5.5"
source = "git+https://github.com/kinode-dao/process_lib?rev=329c7a8#329c7a8314973c857db38c7b712318de9349eb6e"
version = "0.5.7"
source = "git+https://github.com/kinode-dao/process_lib?tag=v0.5.7-alpha#c1ac7227951fbd8cabf6568704f0ce11e8558c8a"
dependencies = [
"anyhow",
"bincode",

View File

@ -10,7 +10,7 @@ lto = true
[dependencies]
anyhow = "1.0"
kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "329c7a8" }
kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.5.7-alpha" }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
wit-bindgen = { git = "https://github.com/bytecodealliance/wit-bindgen", rev = "efcc759" }

View File

@ -139,8 +139,8 @@ checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c"
[[package]]
name = "kinode_process_lib"
version = "0.5.5"
source = "git+https://github.com/kinode-dao/process_lib?rev=329c7a8#329c7a8314973c857db38c7b712318de9349eb6e"
version = "0.5.7"
source = "git+https://github.com/kinode-dao/process_lib?tag=v0.5.7-alpha#c1ac7227951fbd8cabf6568704f0ce11e8558c8a"
dependencies = [
"anyhow",
"bincode",

View File

@ -10,7 +10,7 @@ lto = true
[dependencies]
anyhow = "1.0"
kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "329c7a8" }
kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.5.7-alpha" }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
wit-bindgen = { git = "https://github.com/bytecodealliance/wit-bindgen", rev = "efcc759" }

View File

@ -138,8 +138,8 @@ checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c"
[[package]]
name = "kinode_process_lib"
version = "0.5.5"
source = "git+https://github.com/kinode-dao/process_lib?rev=329c7a8#329c7a8314973c857db38c7b712318de9349eb6e"
version = "0.5.7"
source = "git+https://github.com/kinode-dao/process_lib?tag=v0.5.7-alpha#c1ac7227951fbd8cabf6568704f0ce11e8558c8a"
dependencies = [
"anyhow",
"bincode",

View File

@ -9,7 +9,7 @@ opt-level = "s"
lto = true
[dependencies]
kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "329c7a8" }
kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.5.7-alpha" }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
wit-bindgen = { git = "https://github.com/bytecodealliance/wit-bindgen", rev = "efcc759" }

View File

@ -218,8 +218,8 @@ checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c"
[[package]]
name = "kinode_process_lib"
version = "0.5.5"
source = "git+https://github.com/kinode-dao/process_lib?rev=329c7a8#329c7a8314973c857db38c7b712318de9349eb6e"
version = "0.5.7"
source = "git+https://github.com/kinode-dao/process_lib?tag=v0.5.7-alpha#c1ac7227951fbd8cabf6568704f0ce11e8558c8a"
dependencies = [
"anyhow",
"bincode",

View File

@ -11,7 +11,7 @@ lto = true
[dependencies]
anyhow = "1.0"
clap = "4.4.18"
kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "329c7a8" }
kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.5.7-alpha" }
regex = "1.10.3"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"

View File

@ -137,8 +137,8 @@ checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c"
[[package]]
name = "kinode_process_lib"
version = "0.5.5"
source = "git+https://github.com/kinode-dao/process_lib?rev=329c7a8#329c7a8314973c857db38c7b712318de9349eb6e"
version = "0.5.7"
source = "git+https://github.com/kinode-dao/process_lib?tag=v0.5.7-alpha#c1ac7227951fbd8cabf6568704f0ce11e8558c8a"
dependencies = [
"anyhow",
"bincode",

View File

@ -13,7 +13,7 @@ lto = true
[dependencies]
anyhow = "1.0"
bincode = "1.3.3"
kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "329c7a8" }
kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.5.7-alpha" }
rand = "0.8"
regex = "1.10.3"
serde = { version = "1.0", features = ["derive"] }

View File

@ -128,8 +128,8 @@ checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c"
[[package]]
name = "kinode_process_lib"
version = "0.5.5"
source = "git+https://github.com/kinode-dao/process_lib?rev=329c7a8#329c7a8314973c857db38c7b712318de9349eb6e"
version = "0.5.7"
source = "git+https://github.com/kinode-dao/process_lib?tag=v0.5.7-alpha#c1ac7227951fbd8cabf6568704f0ce11e8558c8a"
dependencies = [
"anyhow",
"bincode",

View File

@ -10,7 +10,7 @@ lto = true
[dependencies]
anyhow = "1.0"
kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "329c7a8" }
kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.5.7-alpha" }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
wit-bindgen = { git = "https://github.com/bytecodealliance/wit-bindgen", rev = "efcc759" }

View File

@ -128,8 +128,8 @@ checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c"
[[package]]
name = "kinode_process_lib"
version = "0.5.5"
source = "git+https://github.com/kinode-dao/process_lib?tag=v0.5.5-alpha#722f2dbfbcc4d1bf5da1fa5db137632a3cede44c"
version = "0.5.7"
source = "git+https://github.com/kinode-dao/process_lib?tag=v0.5.7-alpha#c1ac7227951fbd8cabf6568704f0ce11e8558c8a"
dependencies = [
"anyhow",
"bincode",

View File

@ -13,7 +13,7 @@ lto = true
[dependencies]
anyhow = "1.0"
bincode = "1.3.3"
kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.5.5-alpha" }
kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.5.7-alpha" }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
thiserror = "1.0"

View File

@ -128,8 +128,8 @@ checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c"
[[package]]
name = "kinode_process_lib"
version = "0.5.5"
source = "git+https://github.com/kinode-dao/process_lib?tag=v0.5.5-alpha#722f2dbfbcc4d1bf5da1fa5db137632a3cede44c"
version = "0.5.7"
source = "git+https://github.com/kinode-dao/process_lib?tag=v0.5.7-alpha#c1ac7227951fbd8cabf6568704f0ce11e8558c8a"
dependencies = [
"anyhow",
"bincode",

View File

@ -14,7 +14,7 @@ lto = true
anyhow = "1.0"
bincode = "1.3.3"
indexmap = "2.1"
kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.5.5-alpha" }
kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.5.7-alpha" }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
thiserror = "1.0"