From a251b93875a42312950ec0212f7539612bd9d0a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rog=C3=A9rio=20Ara=C3=BAjo?= Date: Fri, 23 Jan 2026 14:12:02 -0300 Subject: [PATCH 1/3] tests: added some unit tests --- Cargo.lock | 100 +++++++++++++++++ Cargo.toml | 2 + src/errors.rs | 2 +- src/tests/error.rs | 97 ++++++++++++++++ src/tests/handler.rs | 260 +++++++++++++++++++++++++++++++++++++++++++ src/tests/mod.rs | 4 +- src/tests/sophia.rs | 125 +++++++++++++++++++++ 7 files changed, 588 insertions(+), 2 deletions(-) create mode 100644 src/tests/error.rs create mode 100644 src/tests/handler.rs create mode 100644 src/tests/sophia.rs diff --git a/Cargo.lock b/Cargo.lock index 71a9f92..eeabc29 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -10,9 +10,11 @@ dependencies = [ "clap", "http", "http-body-util", + "hyper", "hyper-util", "log", "thiserror", + "tokio", "vetis", ] @@ -109,6 +111,12 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "02b4ff8b16e6076c3e14220b39fbc1fabb6737522281a388998046859400895f" +[[package]] +name = "bitflags" +version = "2.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3" + [[package]] name = "bytes" version = "1.11.0" @@ -383,6 +391,12 @@ dependencies = [ "pin-project-lite", ] +[[package]] +name = "httparse" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" + [[package]] name = "httpdate" version = "1.0.3" @@ -395,16 +409,21 @@ version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2ab2d4f250c3d7b1c9fcdff1cece94ea4e2dfbec68614f7b87cb205f24ca9d11" dependencies = [ + "atomic-waker", "bytes", "futures-channel", "futures-core", "h2", "http", "http-body", + "httparse", "httpdate", + "itoa", "pin-project-lite", + "pin-utils", "smallvec", "tokio", + "want", ] [[package]] @@ -574,6 +593,15 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6373607a59f0be73a39b6fe456b8192fcc3585f602af20751600e974dd455e77" +[[package]] +name = "lock_api" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" +dependencies = [ + "scopeguard", +] + [[package]] name = "log" version = "0.4.29" @@ -615,6 +643,29 @@ version = "1.70.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" +[[package]] +name = "parking_lot" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-link", +] + [[package]] name = "percent-encoding" version = "2.3.2" @@ -627,6 +678,12 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + [[package]] name = "potential_utf" version = "0.1.4" @@ -745,6 +802,15 @@ dependencies = [ "rand_core 0.3.1", ] +[[package]] +name = "redox_syscall" +version = "0.5.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" +dependencies = [ + "bitflags", +] + [[package]] name = "ring" version = "0.17.14" @@ -804,6 +870,12 @@ dependencies = [ "untrusted", ] +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + [[package]] name = "serde" version = "1.0.228" @@ -963,12 +1035,25 @@ dependencies = [ "bytes", "libc", "mio", + "parking_lot", "pin-project-lite", "signal-hook-registry", "socket2", + "tokio-macros", "windows-sys 0.61.2", ] +[[package]] +name = "tokio-macros" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af407857209536a95c8e56f8231ef2c2e2aff839b22e07a1ffcbc617e9db9fa5" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "tokio-rustls" version = "0.26.4" @@ -1011,6 +1096,12 @@ dependencies = [ "once_cell", ] +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + [[package]] name = "unicode-ident" version = "1.0.22" @@ -1072,6 +1163,15 @@ dependencies = [ "url", ] +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] + [[package]] name = "wasi" version = "0.11.1+wasi-snapshot-preview1" diff --git a/Cargo.toml b/Cargo.toml index ade5595..361c1ef 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,7 +17,9 @@ bytes = "1.11.0" clap = { version = "4.5.54", features = ["derive"] } http = "1.4.0" http-body-util = "0.1.3" +hyper = { version = "1.8.1", features = ["full"] } hyper-util = "0.1.19" log = "0.4.29" thiserror = "2.0.18" vetis = "0.1.1" +tokio = { version = "1.0", features = ["full"] } diff --git a/src/errors.rs b/src/errors.rs index 899b592..9dcf176 100644 --- a/src/errors.rs +++ b/src/errors.rs @@ -1,6 +1,6 @@ use thiserror::Error; -#[derive(Error, Debug)] +#[derive(Error, Debug, PartialEq, Clone)] pub enum SophiaError { #[error("Failed to start server: {0}")] ServerStart(String), diff --git a/src/tests/error.rs b/src/tests/error.rs new file mode 100644 index 0000000..7236017 --- /dev/null +++ b/src/tests/error.rs @@ -0,0 +1,97 @@ +#[cfg(test)] +mod error_tests { + use crate::errors::SophiaError; + use std::error::Error as StdError; + + #[test] + fn test_sophia_error_display() { + let error = SophiaError::ServerStart("Failed to bind to port 8080".to_string()); + let display_str = format!("{}", error); + assert_eq!(display_str, "Failed to start server: Failed to bind to port 8080"); + } + + #[test] + fn test_sophia_error_debug() { + let error = SophiaError::ServerStart("Connection refused".to_string()); + let debug_str = format!("{:?}", error); + assert!(debug_str.contains("ServerStart")); + assert!(debug_str.contains("Connection refused")); + } + + #[test] + fn test_sophia_error_source() { + let error = SophiaError::ServerStart("Test error".to_string()); + // SophiaError doesn't implement source() since it doesn't wrap other errors + // But we can test that it implements the Error trait + assert!(::source(&error).is_none()); + } + + #[test] + fn test_sophia_error_from_string() { + let error_msg = "Port already in use".to_string(); + let error = SophiaError::ServerStart(error_msg.clone()); + + match error { + SophiaError::ServerStart(msg) => { + assert_eq!(msg, error_msg); + } + } + } + + #[test] + fn test_sophia_error_clone() { + let error = SophiaError::ServerStart("Test error".to_string()); + let cloned_error = error.clone(); + assert_eq!(format!("{}", error), format!("{}", cloned_error)); + } + + #[test] + fn test_sophia_error_partial_eq() { + let error1 = SophiaError::ServerStart("Same error".to_string()); + let error2 = SophiaError::ServerStart("Same error".to_string()); + let error3 = SophiaError::ServerStart("Different error".to_string()); + + // SophiaError derives PartialEq, so we can compare errors + assert_eq!(error1, error2); + assert_ne!(error1, error3); + } + + #[test] + fn test_sophia_error_send_sync() { + // Test that SophiaError implements Send and Sync + fn assert_send_sync() {} + assert_send_sync::(); + } +} + +#[cfg(test)] +mod integration_error_tests { + use crate::errors::SophiaError; + use std::error::Error as StdError; + + #[test] + fn test_sophia_error_as_dyn_error() { + let error = SophiaError::ServerStart("Test error".to_string()); + let dyn_error: &dyn StdError = &error; + + assert_eq!(dyn_error.to_string(), "Failed to start server: Test error"); + assert!(dyn_error + .source() + .is_none()); + } + + #[test] + fn test_sophia_error_chain() { + let error = SophiaError::ServerStart("Root cause error".to_string()); + + // Test that we can use it in error handling chains + let result: Result<(), SophiaError> = Err(error); + + match result { + Err(SophiaError::ServerStart(msg)) => { + assert_eq!(msg, "Root cause error"); + } + _ => panic!("Expected SophiaError::ServerStart"), + } + } +} diff --git a/src/tests/handler.rs b/src/tests/handler.rs new file mode 100644 index 0000000..c3b5c17 --- /dev/null +++ b/src/tests/handler.rs @@ -0,0 +1,260 @@ +#[cfg(test)] +mod handler_tests { + use bytes::Bytes; + use http_body_util::Full; + use hyper::{Response, StatusCode}; + + type TestResponseType = Response>; + + #[tokio::test] + async fn test_response_creation() { + // Test that we can create basic HTTP responses + let response: TestResponseType = Response::builder() + .status(StatusCode::OK) + .body(Full::new(Bytes::from("Hello, World!"))) + .unwrap(); + + assert_eq!(response.status(), StatusCode::OK); + } + + #[tokio::test] + async fn test_json_response() { + let json_data = r#"{"message": "Hello from Sophia", "status": "success"}"#; + + let response: TestResponseType = Response::builder() + .status(StatusCode::OK) + .header("Content-Type", "application/json") + .body(Full::new(Bytes::from(json_data))) + .unwrap(); + + assert_eq!(response.status(), StatusCode::OK); + assert_eq!( + response + .headers() + .get("Content-Type") + .unwrap(), + "application/json" + ); + } + + #[tokio::test] + async fn test_error_response() { + let response: TestResponseType = Response::builder() + .status(StatusCode::INTERNAL_SERVER_ERROR) + .body(Full::new(Bytes::from("Internal Server Error"))) + .unwrap(); + + assert_eq!(response.status(), StatusCode::INTERNAL_SERVER_ERROR); + } + + #[tokio::test] + async fn test_response_with_headers() { + let response: TestResponseType = Response::builder() + .status(StatusCode::OK) + .header("X-Custom-Header", "test-value") + .header("Cache-Control", "no-cache") + .body(Full::new(Bytes::from("Response with headers"))) + .unwrap(); + + assert_eq!(response.status(), StatusCode::OK); + assert_eq!( + response + .headers() + .get("X-Custom-Header") + .unwrap(), + "test-value" + ); + assert_eq!( + response + .headers() + .get("Cache-Control") + .unwrap(), + "no-cache" + ); + } + + #[tokio::test] + async fn test_empty_response() { + let response: TestResponseType = Response::builder() + .status(StatusCode::NO_CONTENT) + .body(Full::new(Bytes::new())) + .unwrap(); + + assert_eq!(response.status(), StatusCode::NO_CONTENT); + } + + #[tokio::test] + async fn test_different_status_codes() { + let status_codes = vec![ + StatusCode::OK, + StatusCode::CREATED, + StatusCode::ACCEPTED, + StatusCode::NO_CONTENT, + StatusCode::BAD_REQUEST, + StatusCode::UNAUTHORIZED, + StatusCode::FORBIDDEN, + StatusCode::NOT_FOUND, + StatusCode::INTERNAL_SERVER_ERROR, + ]; + + for status in status_codes { + let response: TestResponseType = Response::builder() + .status(status) + .body(Full::new(Bytes::from("Test response"))) + .unwrap(); + + assert_eq!(response.status(), status); + } + } + + #[tokio::test] + async fn test_large_response() { + let large_data = "x".repeat(100_000); // 100KB of data + + let response: TestResponseType = Response::builder() + .status(StatusCode::OK) + .header( + "Content-Length", + large_data + .len() + .to_string(), + ) + .body(Full::new(Bytes::from(large_data))) + .unwrap(); + + assert_eq!(response.status(), StatusCode::OK); + } + + #[tokio::test] + async fn test_async_operations() { + // Test async operations that might happen in handlers + let result = async { + tokio::time::sleep(std::time::Duration::from_millis(10)).await; + "Async result" + } + .await; + + assert_eq!(result, "Async result"); + } + + #[tokio::test] + async fn test_handler_function() { + // Test that we can define a function that could be used as a handler + async fn test_handler() -> TestResponseType { + Response::builder() + .status(StatusCode::OK) + .body(Full::new(Bytes::from("Handler response"))) + .unwrap() + } + + let response = test_handler().await; + assert_eq!(response.status(), StatusCode::OK); + } +} + +#[cfg(test)] +mod handler_integration_tests { + use bytes::Bytes; + use http_body_util::Full; + use hyper::{Response, StatusCode}; + + type TestResponseType = Response>; + + #[tokio::test] + async fn test_rest_api_patterns() { + // Test common REST API response patterns + + // Success response + let success_response: TestResponseType = Response::builder() + .status(StatusCode::OK) + .header("Content-Type", "application/json") + .body(Full::new(Bytes::from(r#"{"status": "success", "data": {}}"#))) + .unwrap(); + assert_eq!(success_response.status(), StatusCode::OK); + + // Created response + let created_response: TestResponseType = Response::builder() + .status(StatusCode::CREATED) + .header("Content-Type", "application/json") + .header("Location", "/api/users/123") + .body(Full::new(Bytes::from(r#"{"id": 123, "created": true}"#))) + .unwrap(); + assert_eq!(created_response.status(), StatusCode::CREATED); + + // Error response + let error_response: TestResponseType = Response::builder() + .status(StatusCode::BAD_REQUEST) + .header("Content-Type", "application/json") + .body(Full::new(Bytes::from(r#"{"error": "Bad Request", "message": "Invalid input"}"#))) + .unwrap(); + assert_eq!(error_response.status(), StatusCode::BAD_REQUEST); + + // Not found response + let not_found_response: TestResponseType = Response::builder() + .status(StatusCode::NOT_FOUND) + .header("Content-Type", "application/json") + .body(Full::new(Bytes::from( + r#"{"error": "Not Found", "message": "Resource not found"}"#, + ))) + .unwrap(); + assert_eq!(not_found_response.status(), StatusCode::NOT_FOUND); + } + + #[tokio::test] + async fn test_content_type_handling() { + let content_types = vec![ + ("application/json", r#"{"key": "value"}"#), + ("text/plain", "Plain text content"), + ("text/html", "Hello"), + ("application/xml", r#"test"#), + ]; + + for (content_type, body) in content_types { + let response: TestResponseType = Response::builder() + .status(StatusCode::OK) + .header("Content-Type", content_type) + .body(Full::new(Bytes::from(body))) + .unwrap(); + + assert_eq!(response.status(), StatusCode::OK); + assert_eq!( + response + .headers() + .get("Content-Type") + .unwrap(), + content_type + ); + } + } + + #[tokio::test] + async fn test_response_chaining() { + // Simulate a chain of operations that might happen in a real handler + + async fn process_request() -> Result> { + // Simulate validation + tokio::time::sleep(std::time::Duration::from_millis(1)).await; + + // Simulate business logic + tokio::time::sleep(std::time::Duration::from_millis(1)).await; + + Ok("Processed data".to_string()) + } + + async fn create_response(data: String) -> TestResponseType { + Response::builder() + .status(StatusCode::OK) + .header("Content-Type", "application/json") + .body(Full::new(Bytes::from(format!(r#"{{"result": "{}"}}"#, data)))) + .unwrap() + } + + // Test the chain + let data = process_request() + .await + .unwrap(); + let response: TestResponseType = create_response(data).await; + + assert_eq!(response.status(), StatusCode::OK); + } +} diff --git a/src/tests/mod.rs b/src/tests/mod.rs index 8b13789..0d4fc74 100644 --- a/src/tests/mod.rs +++ b/src/tests/mod.rs @@ -1 +1,3 @@ - +pub mod error; +pub mod handler; +pub mod sophia; diff --git a/src/tests/sophia.rs b/src/tests/sophia.rs new file mode 100644 index 0000000..1e0d288 --- /dev/null +++ b/src/tests/sophia.rs @@ -0,0 +1,125 @@ +#[cfg(test)] +mod sophia_tests { + use crate::Sophia; + + #[test] + fn test_sophia_new() { + let _sophia = Sophia::new(); + // Test that Sophia can be created successfully + // Since Sophia is a simple struct with no fields, this just verifies it doesn't panic + assert_eq!(std::mem::size_of::(), 0); + } + + #[test] + fn test_sophia_default() { + // Test that we can create multiple instances + let sophia1 = Sophia::new(); + let sophia2 = Sophia::new(); + + // Both should be the same size (zero-sized struct) + assert_eq!(std::mem::size_of_val(&sophia1), 0); + assert_eq!(std::mem::size_of_val(&sophia2), 0); + } + + #[test] + fn test_sophia_send_sync() { + // Test that Sophia implements Send and Sync + fn assert_send_sync() {} + assert_send_sync::(); + } + + #[test] + fn test_sophia_clone() { + // Test that Sophia can be cloned (since it's zero-sized) + let sophia1 = Sophia::new(); + let _sophia2 = sophia1; + // Sophia is automatically Copy because it's zero-sized + let _sophia3 = Sophia::new(); // Create a new instance instead + } +} + +#[cfg(test)] +mod sophia_integration_tests { + use crate::Sophia; + + #[tokio::test] + async fn test_sophia_handler_signature() { + // Test that we can define a handler with the correct signature + // This tests the type compatibility without actually running the server + + // Define a simple handler function that matches the expected signature + async fn test_handler( + _req: vetis::RequestType, + ) -> Result> { + // Return a simple error since we can't create ResponseType easily + Err("Test error".into()) + } + + // Verify the handler can be stored and called (type checking) + let _handler = test_handler; + + // This test passes if it compiles, which means the signature is correct + assert!(true); + } + + #[tokio::test] + async fn test_sophia_configuration() { + // Test that Sophia can be configured with different scenarios + let mut sophia = Sophia::new(); + + // Test that we can create the server configuration + let config = vetis::server::config::ServerConfig::builder() + .port(8080) + .interface("127.0.0.1".to_string()) + .build(); + + // Verify the config was created successfully + assert_eq!(config.port(), 8080); + assert_eq!(config.interface(), "127.0.0.1"); + + // Test that Sophia can work with this configuration + // (We don't actually start the server to avoid port conflicts) + let _ = &mut sophia; + assert!(true); + } + + #[tokio::test] + async fn test_sophia_error_handling() { + // Test error handling scenarios + use crate::errors::SophiaError; + + let error = SophiaError::ServerStart("Test error".to_string()); + + // Test error display + let display_str = format!("{}", error); + assert!(display_str.contains("Failed to start server")); + assert!(display_str.contains("Test error")); + + // Test error debug + let debug_str = format!("{:?}", error); + assert!(debug_str.contains("ServerStart")); + + // Test error equality + let error2 = SophiaError::ServerStart("Test error".to_string()); + assert_eq!(error, error2); + + let error3 = SophiaError::ServerStart("Different error".to_string()); + assert_ne!(error, error3); + } + + #[tokio::test] + async fn test_sophia_multiple_instances() { + // Test creating multiple Sophia instances + let sophia_instances: Vec = (0..5) + .map(|_| Sophia::new()) + .collect(); + + // All instances should be valid + assert_eq!(sophia_instances.len(), 5); + + // All should be zero-sized + for sophia in &sophia_instances { + assert_eq!(std::mem::size_of_val(sophia), 0); + } + } +} From d1c4689042ff68565ec01806be57f5c9d153cddc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rog=C3=A9rio=20Ara=C3=BAjo?= Date: Fri, 23 Jan 2026 17:50:37 -0300 Subject: [PATCH 2/3] chore: renamed project to sofie --- Cargo.lock | 118 +-- Cargo.toml | 10 +- README.md | 14 +- docs/_config.yml | 4 +- docs/index.md | 21 +- docs/llms.txt | 14 +- examples/jsonmock/Cargo.lock | 1604 +++++++++++++++++++++++++++++++++ examples/jsonmock/Cargo.toml | 6 + examples/jsonmock/src/main.rs | 6 +- src/errors.rs | 2 +- src/lib.rs | 14 +- src/tests/error.rs | 60 +- src/tests/sophia.rs | 40 +- 13 files changed, 1718 insertions(+), 195 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index eeabc29..7e5512e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,22 +2,6 @@ # It is not intended for manual editing. version = 4 -[[package]] -name = "Sophia" -version = "0.1.0" -dependencies = [ - "bytes", - "clap", - "http", - "http-body-util", - "hyper", - "hyper-util", - "log", - "thiserror", - "tokio", - "vetis", -] - [[package]] name = "anstream" version = "0.6.21" @@ -111,12 +95,6 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "02b4ff8b16e6076c3e14220b39fbc1fabb6737522281a388998046859400895f" -[[package]] -name = "bitflags" -version = "2.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3" - [[package]] name = "bytes" version = "1.11.0" @@ -391,12 +369,6 @@ dependencies = [ "pin-project-lite", ] -[[package]] -name = "httparse" -version = "1.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" - [[package]] name = "httpdate" version = "1.0.3" @@ -409,21 +381,16 @@ version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2ab2d4f250c3d7b1c9fcdff1cece94ea4e2dfbec68614f7b87cb205f24ca9d11" dependencies = [ - "atomic-waker", "bytes", "futures-channel", "futures-core", "h2", "http", "http-body", - "httparse", "httpdate", - "itoa", "pin-project-lite", - "pin-utils", "smallvec", "tokio", - "want", ] [[package]] @@ -593,15 +560,6 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6373607a59f0be73a39b6fe456b8192fcc3585f602af20751600e974dd455e77" -[[package]] -name = "lock_api" -version = "0.4.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" -dependencies = [ - "scopeguard", -] - [[package]] name = "log" version = "0.4.29" @@ -643,29 +601,6 @@ version = "1.70.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" -[[package]] -name = "parking_lot" -version = "0.12.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" -dependencies = [ - "lock_api", - "parking_lot_core", -] - -[[package]] -name = "parking_lot_core" -version = "0.9.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall", - "smallvec", - "windows-link", -] - [[package]] name = "percent-encoding" version = "2.3.2" @@ -678,12 +613,6 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - [[package]] name = "potential_utf" version = "0.1.4" @@ -802,15 +731,6 @@ dependencies = [ "rand_core 0.3.1", ] -[[package]] -name = "redox_syscall" -version = "0.5.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" -dependencies = [ - "bitflags", -] - [[package]] name = "ring" version = "0.17.14" @@ -870,12 +790,6 @@ dependencies = [ "untrusted", ] -[[package]] -name = "scopeguard" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" - [[package]] name = "serde" version = "1.0.228" @@ -956,6 +870,22 @@ dependencies = [ "windows-sys 0.60.2", ] +[[package]] +name = "sofie" +version = "0.1.0" +dependencies = [ + "bytes", + "clap", + "http", + "http-body-util", + "hyper", + "hyper-util", + "log", + "thiserror", + "tokio", + "vetis", +] + [[package]] name = "stable_deref_trait" version = "1.2.1" @@ -1035,7 +965,6 @@ dependencies = [ "bytes", "libc", "mio", - "parking_lot", "pin-project-lite", "signal-hook-registry", "socket2", @@ -1096,12 +1025,6 @@ dependencies = [ "once_cell", ] -[[package]] -name = "try-lock" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" - [[package]] name = "unicode-ident" version = "1.0.22" @@ -1163,15 +1086,6 @@ dependencies = [ "url", ] -[[package]] -name = "want" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" -dependencies = [ - "try-lock", -] - [[package]] name = "wasi" version = "0.11.1+wasi-snapshot-preview1" diff --git a/Cargo.toml b/Cargo.toml index 361c1ef..79f5790 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,10 +1,10 @@ [package] -name = "Sophia" +name = "sofie" version = "0.1.0" edition = "2021" authors = ["Rogerio Araújo "] -repository = "https://github.com/ararog/sophia" -homepage = "https://github.com/ararog/sophia" +repository = "https://github.com/ararog/sofie" +homepage = "https://github.com/ararog/sofie" description = "Very Tiny Server" readme = "README.md" license = "MIT" @@ -17,9 +17,9 @@ bytes = "1.11.0" clap = { version = "4.5.54", features = ["derive"] } http = "1.4.0" http-body-util = "0.1.3" -hyper = { version = "1.8.1", features = ["full"] } +hyper = { version = "1.8.1", features = ["server"] } hyper-util = "0.1.19" log = "0.4.29" thiserror = "2.0.18" vetis = "0.1.1" -tokio = { version = "1.0", features = ["full"] } +tokio = { version = "1.0", features = ["macros", "rt-multi-thread"] } diff --git a/README.md b/README.md index 252b551..8df3a7e 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ -# Sophia +# Sofie 🌟 **The elegant full-stack web framework that makes Rust web development effortless** -**Sophia** is a comprehensive, production-ready web framework for Rust that combines simplicity with power. Built on top of VeTiS, it provides everything you need to build modern web applications - from REST APIs to full-featured web services - with a clean, intuitive API that makes development a joy. +**Sofie** is a comprehensive, production-ready web framework for Rust that combines simplicity with power. Built on top of VeTiS, it provides everything you need to build modern web applications - from REST APIs to full-featured web services - with a clean, intuitive API that makes development a joy. -## ✨ Why Sophia? +## ✨ Why Sofie? - **🎯 Developer Experience**: Ergonomic API design that feels natural and intuitive - **⚡ High Performance**: Powered by VeTiS for blazing-fast request handling @@ -15,18 +15,18 @@ ## 🛠️ Quick Start -Add Sophia to your `Cargo.toml`: +Add Sofie to your `Cargo.toml`: ```rust -sophia = { version = "0.1.0", features = ["vetis"] } +sofie = { version = "0.1.0", features = ["vetis"] } ``` ## 💡 Usage Example -Here's how simple it is to create a web application with Sophia: +Here's how simple it is to create a web application with Sofie: ```rust -use sophia::Sophia; +use sofie::Sofie; use http_body_util::{Full}; use bytes::Bytes; use hyper::Response; diff --git a/docs/_config.yml b/docs/_config.yml index f443817..1a63139 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -1,5 +1,5 @@ -title: Sophia -baseurl: "/sophia" # the subpath of your site, e.g. /blog +title: Sofie +baseurl: "/sofie" # the subpath of your site, e.g. /blog url: "https://ararog.github.io" # the base hostname & protocol for your site theme: jekyll-theme-cayman diff --git a/docs/index.md b/docs/index.md index 534b9f4..196ca44 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,16 +1,16 @@ --- layout: default -title: Sophia - The elegant full-stack web framework +title: Sofie - The elegant full-stack web framework nav_order: 1 description: "🌟 The elegant full-stack web framework that makes Rust web development effortless" permalink: / ---
-

Sophia

+

Sofie

-[![crates.io](https://img.shields.io/crates/v/sophia?style=flat-square)](https://crates.io/crates/sophia) -[![Build Status](https://github.com/ararog/sophia/actions/workflows/rust.yml/badge.svg?event=push)](https://github.com/ararog/sophia/actions/workflows/rust.yml) +[![crates.io](https://img.shields.io/crates/v/sofie?style=flat-square)](https://crates.io/crates/sofie) +[![Build Status](https://github.com/ararog/sofie/actions/workflows/rust.yml/badge.svg?event=push)](https://github.com/ararog/sofie/actions/workflows/rust.yml) [![Documentation](https://docs.rs/deboa/badge.svg)](https://docs.rs/deboa/latest/deboa) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) @@ -53,13 +53,13 @@ Add to your `Cargo.toml`: ```toml [dependencies] -sophia = { version = "0.0.9", features = ["http1", "tokio-rt"] } +sofie = { version = "0.0.9", features = ["http1", "tokio-rt"] } ``` Basic usage: ```rust -use sophia::Sophia; +use sofie::App; use http_body_util::{Full}; use bytes::Bytes; use hyper::Response; @@ -68,9 +68,9 @@ use hyper::Response; async fn main() -> Result<(), Box> { std_logger::Config::logfmt().init(); - let mut sophia = Sophia::new(config); + let mut app = App::new(); - sophia.serve(|_| async move { + app.serve(|_| async move { Ok(Response::new(Full::new(Bytes::from("Hello World")))) }).await?; @@ -86,12 +86,11 @@ Check out the [examples](./examples.md) for complete examples of how to use Soph You can create a new project from the template using `cargo generate`: -`cargo generate ararog/sophia-templates` +`cargo generate ararog/sofie-templates` ## Documentation -- [API Reference](https://docs.rs/sophia) -- [Migration Guide](./MIGRATION_GUIDE.md) +- [API Reference](https://docs.rs/sofie) - [Contributing Guide](./CONTRIBUTING.md) ## License diff --git a/docs/llms.txt b/docs/llms.txt index 4b7375e..873324d 100644 --- a/docs/llms.txt +++ b/docs/llms.txt @@ -1,18 +1,18 @@ -# sophia +# sofie -**Sophia** is a comprehensive, production-ready web framework for Rust that combines simplicity with power. Built on top of VeTiS, it provides everything you need to build modern web applications - from REST APIs to full-featured web services - with a clean, intuitive API that makes development a joy. +**Sofie** is a comprehensive, production-ready web framework for Rust that combines simplicity with power. Built on top of VeTiS, it provides everything you need to build modern web applications - from REST APIs to full-featured web services - with a clean, intuitive API that makes development a joy. ## Installation ```toml [dependencies] -sophia = { version = "0.0.9", features = ["http1", "tokio-rt"] } +sofie = { version = "0.0.9", features = ["http1", "tokio-rt"] } ``` ## quickstart ```rust -use sophia::Sophia; +use sofie::App; use http_body_util::{Full}; use bytes::Bytes; use hyper::Response; @@ -21,9 +21,9 @@ use hyper::Response; async fn main() -> Result<(), Box> { std_logger::Config::logfmt().init(); - let mut sophia = Sophia::new(config); + let mut app = App::new(); - sophia.serve(|_| async move { + app.serve(|_| async move { Ok(Response::new(Full::new(Bytes::from("Hello World")))) }).await?; @@ -33,7 +33,7 @@ async fn main() -> Result<(), Box> { ## 🗺️ Roadmap -Sophia is continuously evolving! Here's what we're working on: +Sofie is continuously evolving! Here's what we're working on: ### Security & Authentication diff --git a/examples/jsonmock/Cargo.lock b/examples/jsonmock/Cargo.lock index 04821f7..5fe5da7 100644 --- a/examples/jsonmock/Cargo.lock +++ b/examples/jsonmock/Cargo.lock @@ -2,6 +2,1610 @@ # It is not intended for manual editing. version = 4 +[[package]] +name = "Sophia" +version = "0.1.0" +dependencies = [ + "bytes", + "clap", + "http", + "http-body-util", + "hyper", + "hyper-util", + "log", + "thiserror", + "tokio", + "vetis", +] + +[[package]] +name = "anstream" +version = "0.6.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43d5b281e737544384e969a5ccad3f1cdd24b48086a0fc1b2a5262a26b8f4f4a" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78" + +[[package]] +name = "anstyle-parse" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" +dependencies = [ + "anstyle", + "once_cell_polyfill", + "windows-sys 0.61.2", +] + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + +[[package]] +name = "aws-lc-rs" +version = "1.15.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b7b6141e96a8c160799cc2d5adecd5cbbe5054cb8c7c4af53da0f83bb7ad256" +dependencies = [ + "aws-lc-sys", + "zeroize", +] + +[[package]] +name = "aws-lc-sys" +version = "0.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c34dda4df7017c8db52132f0f8a2e0f8161649d15723ed63fc00c82d0f2081a" +dependencies = [ + "cc", + "cmake", + "dunce", + "fs_extra", +] + +[[package]] +name = "bit-set" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9bf6104718e80d7b26a68fdbacff3481cfc05df670821affc7e9cbc1884400c" +dependencies = [ + "bit-vec", +] + +[[package]] +name = "bit-vec" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02b4ff8b16e6076c3e14220b39fbc1fabb6737522281a388998046859400895f" + +[[package]] +name = "bytes" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b35204fbdc0b3f4446b89fc1ac2cf84a8a68971995d0bf2e925ec7cd960f9cb3" + +[[package]] +name = "cc" +version = "1.2.54" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6354c81bbfd62d9cfa9cb3c773c2b7b2a3a482d569de977fd0e961f6e7c00583" +dependencies = [ + "find-msvc-tools", + "jobserver", + "libc", + "shlex", +] + +[[package]] +name = "cfg-if" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" + +[[package]] +name = "chan" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d14956a3dae065ffaa0d92ece848ab4ced88d32361e7fdfbfd653a5c454a1ed8" +dependencies = [ + "rand 0.3.23", +] + +[[package]] +name = "chan-signal" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b829e3f5432da0cc46577d89fc88c937e78052e6735fb47ce0213b0db120b01" +dependencies = [ + "bit-set", + "chan", + "lazy_static", + "libc", +] + +[[package]] +name = "clap" +version = "4.5.54" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6e6ff9dcd79cff5cd969a17a545d79e84ab086e444102a591e288a8aa3ce394" +dependencies = [ + "clap_builder", + "clap_derive", +] + +[[package]] +name = "clap_builder" +version = "4.5.54" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa42cf4d2b7a41bc8f663a7cab4031ebafa1bf3875705bfaf8466dc60ab52c00" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim", +] + +[[package]] +name = "clap_derive" +version = "4.5.49" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a0b5487afeab2deb2ff4e03a807ad1a03ac532ff5a2cee5d86884440c7f7671" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "clap_lex" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3e64b0cc0439b12df2fa678eae89a1c56a529fd067a9115f7827f1fffd22b32" + +[[package]] +name = "cmake" +version = "0.1.57" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75443c44cd6b379beb8c5b45d85d0773baf31cce901fe7bb252f4eff3008ef7d" +dependencies = [ + "cc", +] + +[[package]] +name = "colorchoice" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" + +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "dunce" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" + +[[package]] +name = "equivalent" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" + +[[package]] +name = "erased-serde" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89e8918065695684b2b0702da20382d5ae6065cf3327bc2d6436bd49a71ce9f3" +dependencies = [ + "serde", + "serde_core", + "typeid", +] + +[[package]] +name = "errno" +version = "0.3.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "fastrand" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" + +[[package]] +name = "find-msvc-tools" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8591b0bcc8a98a64310a2fae1bb3e9b8564dd10e381e6e28010fde8e8e8568db" + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "form_urlencoded" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "fs_extra" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" + +[[package]] +name = "fuchsia-cprng" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" + +[[package]] +name = "futures-channel" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" +dependencies = [ + "futures-core", +] + +[[package]] +name = "futures-core" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" + +[[package]] +name = "futures-io" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" + +[[package]] +name = "futures-lite" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f78e10609fe0e0b3f4157ffab1876319b5b0db102a2c60dc4626306dc46b44ad" +dependencies = [ + "fastrand", + "futures-core", + "futures-io", + "parking", + "pin-project-lite", +] + +[[package]] +name = "futures-sink" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" + +[[package]] +name = "getrandom" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "getrandom" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" +dependencies = [ + "cfg-if", + "libc", + "r-efi", + "wasip2", +] + +[[package]] +name = "h2" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f44da3a8150a6703ed5d34e164b875fd14c2cdab9af1252a9a1020bde2bdc54" +dependencies = [ + "atomic-waker", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "http", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "hashbrown" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "http" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3ba2a386d7f85a81f119ad7498ebe444d2e22c2af0b86b069416ace48b3311a" +dependencies = [ + "bytes", + "itoa", +] + +[[package]] +name = "http-body" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" +dependencies = [ + "bytes", + "http", +] + +[[package]] +name = "http-body-util" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" +dependencies = [ + "bytes", + "futures-core", + "http", + "http-body", + "pin-project-lite", +] + +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + +[[package]] +name = "hyper" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ab2d4f250c3d7b1c9fcdff1cece94ea4e2dfbec68614f7b87cb205f24ca9d11" +dependencies = [ + "bytes", + "futures-channel", + "futures-core", + "h2", + "http", + "http-body", + "httpdate", + "pin-project-lite", + "smallvec", + "tokio", +] + +[[package]] +name = "hyper-util" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "727805d60e7938b76b826a6ef209eb70eaa1812794f9424d4a4e2d740662df5f" +dependencies = [ + "bytes", + "futures-core", + "http", + "http-body", + "hyper", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "icu_collections" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c6b649701667bbe825c3b7e6388cb521c23d88644678e83c0c4d0a621a34b43" +dependencies = [ + "displaydoc", + "potential_utf", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locale_core" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edba7861004dd3714265b4db54a3c390e880ab658fec5f7db895fae2046b5bb6" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_normalizer" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f6c8828b67bf8908d82127b2054ea1b4427ff0230ee9141c54251934ab1b599" +dependencies = [ + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7aedcccd01fc5fe81e6b489c15b247b8b0690feb23304303a9e560f37efc560a" + +[[package]] +name = "icu_properties" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "020bfc02fe870ec3a66d93e677ccca0562506e5872c650f893269e08615d74ec" +dependencies = [ + "icu_collections", + "icu_locale_core", + "icu_properties_data", + "icu_provider", + "zerotrie", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "616c294cf8d725c6afcd8f55abc17c56464ef6211f9ed59cccffe534129c77af" + +[[package]] +name = "icu_provider" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85962cf0ce02e1e0a629cc34e7ca3e373ce20dda4c4d7294bbd0bf1fdb59e614" +dependencies = [ + "displaydoc", + "icu_locale_core", + "writeable", + "yoke", + "zerofrom", + "zerotrie", + "zerovec", +] + +[[package]] +name = "idna" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" +dependencies = [ + "icu_normalizer", + "icu_properties", +] + +[[package]] +name = "indexmap" +version = "2.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7714e70437a7dc3ac8eb7e6f8df75fd8eb422675fc7678aff7364301092b1017" +dependencies = [ + "equivalent", + "hashbrown", +] + +[[package]] +name = "is_terminal_polyfill" +version = "1.70.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" + +[[package]] +name = "itoa" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2" + +[[package]] +name = "jobserver" +version = "0.1.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33" +dependencies = [ + "getrandom 0.3.4", + "libc", +] + [[package]] name = "jsonmock" version = "0.1.0" +dependencies = [ + "Sophia", + "bytes", + "http-body-util", + "hyper", + "std-logger", + "tokio", +] + +[[package]] +name = "lazy_static" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76f033c7ad61445c5b347c7382dd1237847eb1bce590fe50365dcb33d546be73" + +[[package]] +name = "libc" +version = "0.2.180" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bcc35a38544a891a5f7c865aca548a982ccb3b8650a5b06d0fd33a10283c56fc" + +[[package]] +name = "litemap" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6373607a59f0be73a39b6fe456b8192fcc3585f602af20751600e974dd455e77" + +[[package]] +name = "log" +version = "0.4.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" +dependencies = [ + "value-bag", +] + +[[package]] +name = "memchr" +version = "2.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "mio" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a69bcab0ad47271a0234d9422b131806bf3968021e5dc9328caf2d4cd58557fc" +dependencies = [ + "libc", + "wasi", + "windows-sys 0.61.2", +] + +[[package]] +name = "once_cell" +version = "1.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" + +[[package]] +name = "once_cell_polyfill" +version = "1.70.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" + +[[package]] +name = "parking" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" + +[[package]] +name = "percent-encoding" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" + +[[package]] +name = "pin-project-lite" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" + +[[package]] +name = "potential_utf" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b73949432f5e2a09657003c25bca5e19a0e9c84f8058ca374f49e0ebe605af77" +dependencies = [ + "zerovec", +] + +[[package]] +name = "ppv-lite86" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "proc-macro2" +version = "1.0.106" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21b2ebcf727b7760c461f091f9f0f539b77b8e87f2fd88131e7f1b433b3cece4" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "r-efi" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + +[[package]] +name = "rand" +version = "0.3.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64ac302d8f83c0c1974bf758f6b041c6c8ada916fbb44a609158ca8b064cc76c" +dependencies = [ + "libc", + "rand 0.4.6", +] + +[[package]] +name = "rand" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "552840b97013b1a26992c11eac34bdd778e464601a4c2054b5f0bff7c6761293" +dependencies = [ + "fuchsia-cprng", + "libc", + "rand_core 0.3.1", + "rdrand", + "winapi", +] + +[[package]] +name = "rand" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" +dependencies = [ + "rand_chacha", + "rand_core 0.9.5", +] + +[[package]] +name = "rand_chacha" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" +dependencies = [ + "ppv-lite86", + "rand_core 0.9.5", +] + +[[package]] +name = "rand_core" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" +dependencies = [ + "rand_core 0.4.2", +] + +[[package]] +name = "rand_core" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" + +[[package]] +name = "rand_core" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c" +dependencies = [ + "getrandom 0.3.4", +] + +[[package]] +name = "rdrand" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" +dependencies = [ + "rand_core 0.3.1", +] + +[[package]] +name = "ring" +version = "0.17.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" +dependencies = [ + "cc", + "cfg-if", + "getrandom 0.2.17", + "libc", + "untrusted", + "windows-sys 0.52.0", +] + +[[package]] +name = "rt-gate" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55077df4d19e50d09bf521fcea498ad9aea0fed6419f3552d16eff42e005ff6e" +dependencies = [ + "tokio", +] + +[[package]] +name = "rustls" +version = "0.23.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c665f33d38cea657d9614f766881e4d510e0eda4239891eea56b4cadcf01801b" +dependencies = [ + "aws-lc-rs", + "log", + "once_cell", + "rustls-pki-types", + "rustls-webpki", + "subtle", + "zeroize", +] + +[[package]] +name = "rustls-pki-types" +version = "1.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be040f8b0a225e40375822a563fa9524378b9d63112f53e19ffff34df5d33fdd" +dependencies = [ + "zeroize", +] + +[[package]] +name = "rustls-webpki" +version = "0.103.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7df23109aa6c1567d1c575b9952556388da57401e4ace1d15f79eedad0d8f53" +dependencies = [ + "aws-lc-rs", + "ring", + "rustls-pki-types", + "untrusted", +] + +[[package]] +name = "ryu" +version = "1.0.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a50f4cf475b65d88e057964e0e9bb1f0aa9bbb2036dc65c64596b42932536984" + +[[package]] +name = "serde" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" +dependencies = [ + "serde_core", +] + +[[package]] +name = "serde_core" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_fmt" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e497af288b3b95d067a23a4f749f2861121ffcb2f6d8379310dcda040c345ed" +dependencies = [ + "serde_core", +] + +[[package]] +name = "serde_json" +version = "1.0.149" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" +dependencies = [ + "itoa", + "memchr", + "serde", + "serde_core", + "zmij", +] + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "signal-hook-registry" +version = "1.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b" +dependencies = [ + "errno", + "libc", +] + +[[package]] +name = "slab" +version = "0.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589" + +[[package]] +name = "smallvec" +version = "1.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" + +[[package]] +name = "socket2" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86f4aa3ad99f2088c990dfa82d367e19cb29268ed67c574d10d0a4bfe71f07e0" +dependencies = [ + "libc", + "windows-sys 0.60.2", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" + +[[package]] +name = "std-logger" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1baf2900ed4f952e1e5a65d29c5aa68507e3068d5e4b001457b95505d82cd6cc" +dependencies = [ + "itoa", + "log", + "ryu", +] + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + +[[package]] +name = "sval" +version = "2.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "502b8906c4736190684646827fbab1e954357dfe541013bbd7994d033d53a1ca" + +[[package]] +name = "sval_buffer" +version = "2.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4b854348b15b6c441bdd27ce9053569b016a0723eab2d015b1fd8e6abe4f708" +dependencies = [ + "sval", + "sval_ref", +] + +[[package]] +name = "sval_dynamic" +version = "2.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0bd9e8b74410ddad37c6962587c5f9801a2caadba9e11f3f916ee3f31ae4a1f" +dependencies = [ + "sval", +] + +[[package]] +name = "sval_fmt" +version = "2.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fe17b8deb33a9441280b4266c2d257e166bafbaea6e66b4b34ca139c91766d9" +dependencies = [ + "itoa", + "ryu", + "sval", +] + +[[package]] +name = "sval_json" +version = "2.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "854addb048a5bafb1f496c98e0ab5b9b581c3843f03ca07c034ae110d3b7c623" +dependencies = [ + "itoa", + "ryu", + "sval", +] + +[[package]] +name = "sval_nested" +version = "2.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96cf068f482108ff44ae8013477cb047a1665d5f1a635ad7cf79582c1845dce9" +dependencies = [ + "sval", + "sval_buffer", + "sval_ref", +] + +[[package]] +name = "sval_ref" +version = "2.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed02126365ffe5ab8faa0abd9be54fbe68d03d607cd623725b0a71541f8aaa6f" +dependencies = [ + "sval", +] + +[[package]] +name = "sval_serde" +version = "2.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a263383c6aa2076c4ef6011d3bae1b356edf6ea2613e3d8e8ebaa7b57dd707d5" +dependencies = [ + "serde_core", + "sval", + "sval_nested", +] + +[[package]] +name = "syn" +version = "2.0.114" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4d107df263a3013ef9b1879b0df87d706ff80f65a86ea879bd9c31f9b307c2a" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "synstructure" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "thiserror" +version = "2.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tinystr" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42d3e9c45c09de15d06dd8acf5f4e0e399e85927b7f00711024eb7ae10fa4869" +dependencies = [ + "displaydoc", + "zerovec", +] + +[[package]] +name = "tokio" +version = "1.49.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72a2903cd7736441aac9df9d7688bd0ce48edccaadf181c3b90be801e81d3d86" +dependencies = [ + "bytes", + "libc", + "mio", + "pin-project-lite", + "signal-hook-registry", + "socket2", + "tokio-macros", + "windows-sys 0.61.2", +] + +[[package]] +name = "tokio-macros" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af407857209536a95c8e56f8231ef2c2e2aff839b22e07a1ffcbc617e9db9fa5" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tokio-rustls" +version = "0.26.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1729aa945f29d91ba541258c8df89027d5792d85a8841fb65e8bf0f4ede4ef61" +dependencies = [ + "rustls", + "tokio", +] + +[[package]] +name = "tokio-util" +version = "0.7.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ae9cec805b01e8fc3fd2fe289f89149a9b66dd16786abd8b19cfa7b48cb0098" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "tracing" +version = "0.1.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" +dependencies = [ + "pin-project-lite", + "tracing-core", +] + +[[package]] +name = "tracing-core" +version = "0.1.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" +dependencies = [ + "once_cell", +] + +[[package]] +name = "typeid" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc7d623258602320d5c55d1bc22793b57daff0ec7efc270ea7d55ce1d5f5471c" + +[[package]] +name = "unicode-ident" +version = "1.0.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" + +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + +[[package]] +name = "url" +version = "2.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", + "serde", +] + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + +[[package]] +name = "utf8parse" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" + +[[package]] +name = "value-bag" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ba6f5989077681266825251a52748b8c1d8a4ad098cc37e440103d0ea717fc0" +dependencies = [ + "value-bag-serde1", + "value-bag-sval2", +] + +[[package]] +name = "value-bag-serde1" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16530907bfe2999a1773ca5900a65101e092c70f642f25cc23ca0c43573262c5" +dependencies = [ + "erased-serde", + "serde_core", + "serde_fmt", +] + +[[package]] +name = "value-bag-sval2" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d00ae130edd690eaa877e4f40605d534790d1cf1d651e7685bd6a144521b251f" +dependencies = [ + "sval", + "sval_buffer", + "sval_dynamic", + "sval_fmt", + "sval_json", + "sval_ref", + "sval_serde", +] + +[[package]] +name = "vetis" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7073315fdb7ae829447c98dca1ca2ff5655330d5989ce1870213754013ac113" +dependencies = [ + "bytes", + "chan-signal", + "futures-lite", + "http", + "http-body-util", + "hyper", + "hyper-util", + "log", + "mime", + "rand 0.9.2", + "rt-gate", + "rustls", + "serde", + "serde_json", + "thiserror", + "tokio", + "tokio-rustls", + "url", +] + +[[package]] +name = "wasi" +version = "0.11.1+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + +[[package]] +name = "wasip2" +version = "1.0.2+wasi-0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9517f9239f02c069db75e65f174b3da828fe5f5b945c4dd26bd25d89c03ebcf5" +dependencies = [ + "wit-bindgen", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" +dependencies = [ + "windows-targets 0.53.5", +] + +[[package]] +name = "windows-sys" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm 0.52.6", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", +] + +[[package]] +name = "windows-targets" +version = "0.53.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" +dependencies = [ + "windows-link", + "windows_aarch64_gnullvm 0.53.1", + "windows_aarch64_msvc 0.53.1", + "windows_i686_gnu 0.53.1", + "windows_i686_gnullvm 0.53.1", + "windows_i686_msvc 0.53.1", + "windows_x86_64_gnu 0.53.1", + "windows_x86_64_gnullvm 0.53.1", + "windows_x86_64_msvc 0.53.1", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_i686_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" + +[[package]] +name = "wit-bindgen" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5" + +[[package]] +name = "writeable" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9edde0db4769d2dc68579893f2306b26c6ecfbe0ef499b013d731b7b9247e0b9" + +[[package]] +name = "yoke" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72d6e5c6afb84d73944e5cedb052c4680d5657337201555f9f2a16b7406d4954" +dependencies = [ + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b659052874eb698efe5b9e8cf382204678a0086ebf46982b79d6ca3182927e5d" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + +[[package]] +name = "zerocopy" +version = "0.8.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "668f5168d10b9ee831de31933dc111a459c97ec93225beb307aed970d1372dfd" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c7962b26b0a8685668b671ee4b54d007a67d4eaf05fda79ac0ecf41e32270f1" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "zerofrom" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + +[[package]] +name = "zeroize" +version = "1.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0" + +[[package]] +name = "zerotrie" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a59c17a5562d507e4b54960e8569ebee33bee890c70aa3fe7b97e85a9fd7851" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", +] + +[[package]] +name = "zerovec" +version = "0.11.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c28719294829477f525be0186d13efa9a3c602f7ec202ca9e353d310fb9a002" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eadce39539ca5cb3985590102671f2567e659fca9666581ad3411d59207951f3" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "zmij" +version = "1.0.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfcd145825aace48cff44a8844de64bf75feec3080e0aa5cdbde72961ae51a65" diff --git a/examples/jsonmock/Cargo.toml b/examples/jsonmock/Cargo.toml index 2ff6c17..027f084 100644 --- a/examples/jsonmock/Cargo.toml +++ b/examples/jsonmock/Cargo.toml @@ -4,3 +4,9 @@ version = "0.1.0" edition = "2024" [dependencies] +bytes = "1.11.0" +http-body-util = "0.1.3" +hyper = "1.8.1" +Sophia = { version = "0.1.0", path = "../.." } +std-logger = "0.5.7" +tokio = { version = "1.49.0", features = ["macros", "rt-multi-thread"] } diff --git a/examples/jsonmock/src/main.rs b/examples/jsonmock/src/main.rs index 23d5414..37ca2ff 100644 --- a/examples/jsonmock/src/main.rs +++ b/examples/jsonmock/src/main.rs @@ -1,4 +1,4 @@ -use sophia::Sophia; +use sofie::App; use http_body_util::{Full}; use bytes::Bytes; use hyper::Response; @@ -7,9 +7,9 @@ use hyper::Response; async fn main() -> Result<(), Box> { std_logger::Config::logfmt().init(); - let mut sophia = Sophia::new(config); + let mut app = App::new(); - sophia.serve(|_| async move { + app.serve(|_| async move { Ok(Response::new(Full::new(Bytes::from("Hello World")))) }).await?; diff --git a/src/errors.rs b/src/errors.rs index 9dcf176..7f7f8a5 100644 --- a/src/errors.rs +++ b/src/errors.rs @@ -1,7 +1,7 @@ use thiserror::Error; #[derive(Error, Debug, PartialEq, Clone)] -pub enum SophiaError { +pub enum SofieError { #[error("Failed to start server: {0}")] ServerStart(String), } diff --git a/src/lib.rs b/src/lib.rs index 98fb9d6..6710df1 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -6,19 +6,19 @@ use vetis::{ RequestType, ResponseType, Vetis, }; -use crate::errors::SophiaError; +use crate::errors::SofieError; pub mod errors; mod tests; -pub struct Sophia {} +pub struct App {} -impl Sophia { - pub fn new() -> Sophia { - Sophia {} +impl App { + pub fn new() -> App { + App {} } - pub async fn serve(&mut self, handler: F) -> Result<(), SophiaError> + pub async fn serve(&mut self, handler: F) -> Result<(), SofieError> where F: Fn(RequestType) -> Fut + Send + Sync + 'static, Fut: Future> + Send + 'static, @@ -39,7 +39,7 @@ impl Sophia { if let Err(e) = result { error!("Failed to start server: {}", e); - return Err(SophiaError::ServerStart(e.to_string())); + return Err(SofieError::ServerStart(e.to_string())); } Ok(()) diff --git a/src/tests/error.rs b/src/tests/error.rs index 7236017..741c96b 100644 --- a/src/tests/error.rs +++ b/src/tests/error.rs @@ -1,77 +1,77 @@ #[cfg(test)] mod error_tests { - use crate::errors::SophiaError; + use crate::errors::SofieError; use std::error::Error as StdError; #[test] - fn test_sophia_error_display() { - let error = SophiaError::ServerStart("Failed to bind to port 8080".to_string()); + fn test_sofie_error_display() { + let error = SofieError::ServerStart("Failed to bind to port 8080".to_string()); let display_str = format!("{}", error); assert_eq!(display_str, "Failed to start server: Failed to bind to port 8080"); } #[test] - fn test_sophia_error_debug() { - let error = SophiaError::ServerStart("Connection refused".to_string()); + fn test_sofie_error_debug() { + let error = SofieError::ServerStart("Connection refused".to_string()); let debug_str = format!("{:?}", error); assert!(debug_str.contains("ServerStart")); assert!(debug_str.contains("Connection refused")); } #[test] - fn test_sophia_error_source() { - let error = SophiaError::ServerStart("Test error".to_string()); - // SophiaError doesn't implement source() since it doesn't wrap other errors + fn test_sofie_error_source() { + let error = SofieError::ServerStart("Test error".to_string()); + // SofieError doesn't implement source() since it doesn't wrap other errors // But we can test that it implements the Error trait - assert!(::source(&error).is_none()); + assert!(::source(&error).is_none()); } #[test] - fn test_sophia_error_from_string() { + fn test_sofie_error_from_string() { let error_msg = "Port already in use".to_string(); - let error = SophiaError::ServerStart(error_msg.clone()); + let error = SofieError::ServerStart(error_msg.clone()); match error { - SophiaError::ServerStart(msg) => { + SofieError::ServerStart(msg) => { assert_eq!(msg, error_msg); } } } #[test] - fn test_sophia_error_clone() { - let error = SophiaError::ServerStart("Test error".to_string()); + fn test_sofie_error_clone() { + let error = SofieError::ServerStart("Test error".to_string()); let cloned_error = error.clone(); assert_eq!(format!("{}", error), format!("{}", cloned_error)); } #[test] - fn test_sophia_error_partial_eq() { - let error1 = SophiaError::ServerStart("Same error".to_string()); - let error2 = SophiaError::ServerStart("Same error".to_string()); - let error3 = SophiaError::ServerStart("Different error".to_string()); + fn test_sofie_error_partial_eq() { + let error1 = SofieError::ServerStart("Same error".to_string()); + let error2 = SofieError::ServerStart("Same error".to_string()); + let error3 = SofieError::ServerStart("Different error".to_string()); - // SophiaError derives PartialEq, so we can compare errors + // SofieError derives PartialEq, so we can compare errors assert_eq!(error1, error2); assert_ne!(error1, error3); } #[test] - fn test_sophia_error_send_sync() { - // Test that SophiaError implements Send and Sync + fn test_sofie_error_send_sync() { + // Test that SofieError implements Send and Sync fn assert_send_sync() {} - assert_send_sync::(); + assert_send_sync::(); } } #[cfg(test)] mod integration_error_tests { - use crate::errors::SophiaError; + use crate::errors::SofieError; use std::error::Error as StdError; #[test] - fn test_sophia_error_as_dyn_error() { - let error = SophiaError::ServerStart("Test error".to_string()); + fn test_sofie_error_as_dyn_error() { + let error = SofieError::ServerStart("Test error".to_string()); let dyn_error: &dyn StdError = &error; assert_eq!(dyn_error.to_string(), "Failed to start server: Test error"); @@ -81,17 +81,17 @@ mod integration_error_tests { } #[test] - fn test_sophia_error_chain() { - let error = SophiaError::ServerStart("Root cause error".to_string()); + fn test_sofie_error_chain() { + let error = SofieError::ServerStart("Root cause error".to_string()); // Test that we can use it in error handling chains - let result: Result<(), SophiaError> = Err(error); + let result: Result<(), SofieError> = Err(error); match result { - Err(SophiaError::ServerStart(msg)) => { + Err(SofieError::ServerStart(msg)) => { assert_eq!(msg, "Root cause error"); } - _ => panic!("Expected SophiaError::ServerStart"), + _ => panic!("Expected SofieError::ServerStart"), } } } diff --git a/src/tests/sophia.rs b/src/tests/sophia.rs index 1e0d288..1c15fc4 100644 --- a/src/tests/sophia.rs +++ b/src/tests/sophia.rs @@ -1,20 +1,20 @@ #[cfg(test)] -mod sophia_tests { - use crate::Sophia; +mod sofie_tests { + use crate::App; #[test] - fn test_sophia_new() { - let _sophia = Sophia::new(); + fn test_sofie_new() { + let _sofie = App::new(); // Test that Sophia can be created successfully // Since Sophia is a simple struct with no fields, this just verifies it doesn't panic - assert_eq!(std::mem::size_of::(), 0); + assert_eq!(std::mem::size_of::(), 0); } #[test] fn test_sophia_default() { // Test that we can create multiple instances - let sophia1 = Sophia::new(); - let sophia2 = Sophia::new(); + let sophia1 = App::new(); + let sophia2 = App::new(); // Both should be the same size (zero-sized struct) assert_eq!(std::mem::size_of_val(&sophia1), 0); @@ -23,24 +23,24 @@ mod sophia_tests { #[test] fn test_sophia_send_sync() { - // Test that Sophia implements Send and Sync + // Test that sofie implements Send and Sync fn assert_send_sync() {} - assert_send_sync::(); + assert_send_sync::(); } #[test] fn test_sophia_clone() { // Test that Sophia can be cloned (since it's zero-sized) - let sophia1 = Sophia::new(); + let sophia1 = App::new(); let _sophia2 = sophia1; // Sophia is automatically Copy because it's zero-sized - let _sophia3 = Sophia::new(); // Create a new instance instead + let _sophia3 = App::new(); // Create a new instance instead } } #[cfg(test)] mod sophia_integration_tests { - use crate::Sophia; + use crate::App; #[tokio::test] async fn test_sophia_handler_signature() { @@ -65,7 +65,7 @@ mod sophia_integration_tests { #[tokio::test] async fn test_sophia_configuration() { // Test that Sophia can be configured with different scenarios - let mut sophia = Sophia::new(); + let mut sophia = App::new(); // Test that we can create the server configuration let config = vetis::server::config::ServerConfig::builder() @@ -86,9 +86,9 @@ mod sophia_integration_tests { #[tokio::test] async fn test_sophia_error_handling() { // Test error handling scenarios - use crate::errors::SophiaError; + use crate::errors::SofieError; - let error = SophiaError::ServerStart("Test error".to_string()); + let error = SofieError::ServerStart("Test error".to_string()); // Test error display let display_str = format!("{}", error); @@ -100,18 +100,18 @@ mod sophia_integration_tests { assert!(debug_str.contains("ServerStart")); // Test error equality - let error2 = SophiaError::ServerStart("Test error".to_string()); + let error2 = SofieError::ServerStart("Test error".to_string()); assert_eq!(error, error2); - let error3 = SophiaError::ServerStart("Different error".to_string()); + let error3 = SofieError::ServerStart("Different error".to_string()); assert_ne!(error, error3); } #[tokio::test] async fn test_sophia_multiple_instances() { - // Test creating multiple Sophia instances - let sophia_instances: Vec = (0..5) - .map(|_| Sophia::new()) + // Test creating multiple Sofie instances + let sophia_instances: Vec = (0..5) + .map(|_| App::new()) .collect(); // All instances should be valid From 86c1daf23537d00c189542304c82b4c69b6e40b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rog=C3=A9rio=20Ara=C3=BAjo?= Date: Fri, 23 Jan 2026 17:51:30 -0300 Subject: [PATCH 3/3] ci: fixed dep name --- examples/jsonmock/Cargo.lock | 34 +++++++++++++++++----------------- examples/jsonmock/Cargo.toml | 2 +- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/examples/jsonmock/Cargo.lock b/examples/jsonmock/Cargo.lock index 5fe5da7..6fd7d75 100644 --- a/examples/jsonmock/Cargo.lock +++ b/examples/jsonmock/Cargo.lock @@ -2,22 +2,6 @@ # It is not intended for manual editing. version = 4 -[[package]] -name = "Sophia" -version = "0.1.0" -dependencies = [ - "bytes", - "clap", - "http", - "http-body-util", - "hyper", - "hyper-util", - "log", - "thiserror", - "tokio", - "vetis", -] - [[package]] name = "anstream" version = "0.6.21" @@ -598,10 +582,10 @@ dependencies = [ name = "jsonmock" version = "0.1.0" dependencies = [ - "Sophia", "bytes", "http-body-util", "hyper", + "sofie", "std-logger", "tokio", ] @@ -958,6 +942,22 @@ dependencies = [ "windows-sys 0.60.2", ] +[[package]] +name = "sofie" +version = "0.1.0" +dependencies = [ + "bytes", + "clap", + "http", + "http-body-util", + "hyper", + "hyper-util", + "log", + "thiserror", + "tokio", + "vetis", +] + [[package]] name = "stable_deref_trait" version = "1.2.1" diff --git a/examples/jsonmock/Cargo.toml b/examples/jsonmock/Cargo.toml index 027f084..b8f4e3c 100644 --- a/examples/jsonmock/Cargo.toml +++ b/examples/jsonmock/Cargo.toml @@ -7,6 +7,6 @@ edition = "2024" bytes = "1.11.0" http-body-util = "0.1.3" hyper = "1.8.1" -Sophia = { version = "0.1.0", path = "../.." } +sofie = { version = "0.1.0", path = "../.." } std-logger = "0.5.7" tokio = { version = "1.49.0", features = ["macros", "rt-multi-thread"] }