From 62bd58ef3da65c5f191e7b94904f8af390dcda2d Mon Sep 17 00:00:00 2001 From: liuhy Date: Tue, 21 Jan 2025 09:51:53 +0800 Subject: [PATCH 1/2] [type:bugfix] fix publish error --- shenyu-client-rust/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shenyu-client-rust/src/lib.rs b/shenyu-client-rust/src/lib.rs index b143479..0191a37 100644 --- a/shenyu-client-rust/src/lib.rs +++ b/shenyu-client-rust/src/lib.rs @@ -68,7 +68,7 @@ clippy::separated_literal_suffix, // conflicts with clippy::unseparated_literal_suffix clippy::single_char_lifetime_names, // TODO: change lifetime names )] -#![doc = include_str!("../../README.md")] +#![doc = include_str!("../README.md")] use crate::model::UriInfo; From a8c826cf25c0d5ab65332be654e9fc26e14ec99a Mon Sep 17 00:00:00 2001 From: liuhy Date: Tue, 21 Jan 2025 10:03:41 +0800 Subject: [PATCH 2/2] [type:bugfix] fix publish error --- shenyu-client-rust/README.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 shenyu-client-rust/README.md diff --git a/shenyu-client-rust/README.md b/shenyu-client-rust/README.md new file mode 100644 index 0000000..4cdaf1c --- /dev/null +++ b/shenyu-client-rust/README.md @@ -0,0 +1,31 @@ +# Apache ShenYu-Client-Rust + +The Apache `ShenYu` Rust Client SDK is a Rust library for interacting with the Apache `ShenYu` gateway. This SDK allows you to easily integrate your Rust applications with the `ShenYu` gateway, providing a seamless way to manage and route your API requests. + +## Installation + +To use the Apache `ShenYu` Rust Client SDK in your project, add the following dependencies to your `Cargo.toml` file: + +```toml +[dependencies] +serde = "1.0.190" +serde_json = "1.0.80" +reqwest = "0.12.5" +axum = "0.5" +tokio = "1.39.3" +shenyu-client-rust = {version = "0.1.1", features = ["actix-web", "axum"] } +``` + +## Usage + +Below is an example of how to create an Axum service using `ShenYuRouter` and integrate it with the `ShenYu` Gateway. + +### Example + +See [examples](https://github.com/apache/shenyu-client-rust/tree/main/examples). + +This example demonstrates how to set up a basic Axum service using `ShenYuRouter` and register it with the `ShenYu` Gateway. `health_handler` and `create_user_handler` are simple asynchronous functions that handle HTTP requests. + +## License + +This project is licensed under the Apache License 2.0. For more details, see the [LICENSE](LICENSE) file.