4 Commits

Author SHA1 Message Date
a1e10f93ce bump
Some checks failed
Build library & run tests / build (unix) (push) Successful in 57s
Build library & run tests / build (tcp) (push) Successful in 54s
Publish library / publish (push) Failing after 21s
Build library & run tests / docs (push) Successful in 22s
2024-06-25 18:19:35 +02:00
2cf0b9abe4 Don't run doctests which would break on unix
All checks were successful
Build library & run tests / build (unix) (push) Successful in 28s
Build library & run tests / build (tcp) (push) Successful in 29s
Build library & run tests / docs (push) Successful in 30s
2024-06-25 11:48:47 +02:00
8b0f01e606 Add information about dependencies to README
Some checks failed
Build library & run tests / build (unix) (push) Failing after 48s
Build library & run tests / docs (push) Successful in 49s
Build library & run tests / build (tcp) (push) Successful in 53s
2024-06-25 11:44:25 +02:00
beda8c151d Changes in dependencies 2024-06-25 11:43:04 +02:00
4 changed files with 14 additions and 14 deletions

2
Cargo.lock generated
View File

@@ -153,7 +153,7 @@ checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422"
[[package]] [[package]]
name = "eagle" name = "eagle"
version = "0.2.4" version = "0.3.0"
dependencies = [ dependencies = [
"env_logger", "env_logger",
"log", "log",

View File

@@ -1,6 +1,6 @@
[package] [package]
name = "eagle" name = "eagle"
version = "0.2.4" version = "0.3.0"
description = "A simple library for creating RPC protocols." description = "A simple library for creating RPC protocols."
repository = "https://git.colon-three.com/kodi/eagle" repository = "https://git.colon-three.com/kodi/eagle"
authors = ["KodiCraft <kodi@kdcf.me>"] authors = ["KodiCraft <kodi@kdcf.me>"]
@@ -10,26 +10,24 @@ resolver = "2"
[features] [features]
default = ["tcp", "log"] default = ["tcp", "log"]
tcp = ["tokio/net"] tcp = []
unix = ["tokio/net"] unix = []
log = ["dep:log", "dep:env_logger"] log = []
[dependencies] [dependencies]
proc-macro2 = "1.0.85" proc-macro2 = "1.0.85"
quote = "1.0.36" quote = "1.0.36"
ron = "0.8.1"
serde = { version = "1.0.203", features = ["serde_derive"] }
syn = "2.0.66" syn = "2.0.66"
tokio = { version = "1.38.0", features = ["sync", "io-util"] }
env_logger = { version = "0.11.3", optional = true }
log = { version = "0.4.21", optional = true }
[dev-dependencies] [dev-dependencies]
# tokio = { version = "1.38.0", features = ["sync", "io-util"] }
ron = "0.8.1"
serde = { version = "1.0.203", features = ["serde_derive"] }
rand = "0.8.5" rand = "0.8.5"
tokio = { version = "1.38.0", features = ["sync", "rt-multi-thread", "macros", "time", "io-util", "net"] } tokio = { version = "1.38.0", features = ["sync", "rt-multi-thread", "macros", "time", "io-util", "net"] }
env_logger = "0.11.3"
log = "0.4.21"
tokio-test = "0.4.4" tokio-test = "0.4.4"
env_logger = { version = "0.11.3" }
log = { version = "0.4.21" }
[lib] [lib]
proc-macro = true proc-macro = true

View File

@@ -9,6 +9,8 @@ Eagle is still in early development. Performance is not ideal, the interface is
Eagle is a library which allows you to easily build an [RPC](https://en.wikipedia.org/wiki/Remote_procedure_call) protocol. Eagle is a library which allows you to easily build an [RPC](https://en.wikipedia.org/wiki/Remote_procedure_call) protocol.
It uses a macro to generate the required communication code and makes adding new functions easy and quick. Eagle is designed to work specifically with [`tokio`](https://crates.io/crates/tokio) and uses [`serde`](https://crates.io/crates/serde) for formatting data. It uses a macro to generate the required communication code and makes adding new functions easy and quick. Eagle is designed to work specifically with [`tokio`](https://crates.io/crates/tokio) and uses [`serde`](https://crates.io/crates/serde) for formatting data.
Please note that since `eagle` is a pure proc-macro library, you must manually add compatible versions of `tokio`, `serde`, `ron` and optionally `log` to your dependencies.
## Using Eagle ## Using Eagle
The way that `eagle` is designed to be used is inside a shared dependency between your "server" and your "client". Both of these should be in a workspace. Create a `shared` crate which both components should depend on, this crate should have `eagle` as a dependency. By default `eagle` uses TCP for communication, but you may disable default features and enable the `unix` feature on `eagle` to use unix sockets instead. The way that `eagle` is designed to be used is inside a shared dependency between your "server" and your "client". Both of these should be in a workspace. Create a `shared` crate which both components should depend on, this crate should have `eagle` as a dependency. By default `eagle` uses TCP for communication, but you may disable default features and enable the `unix` feature on `eagle` to use unix sockets instead.

View File

@@ -79,7 +79,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
//! To start the server, you simply need to use the generated server struct and //! To start the server, you simply need to use the generated server struct and
//! pass it your handler. //! pass it your handler.
//! //!
//! ```rust //! ```no_run
//! # use eagle::Protocol; //! # use eagle::Protocol;
//! # #[derive(Protocol)] //! # #[derive(Protocol)]
//! # pub enum Example { //! # pub enum Example {
@@ -112,7 +112,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
//! On the client side, you can simply use the generated client struct to connect //! On the client side, you can simply use the generated client struct to connect
//! to the server and begin sending queries. //! to the server and begin sending queries.
//! //!
//! ```rust //! ```no_run
//! # use eagle::Protocol; //! # use eagle::Protocol;
//! # #[derive(Protocol)] //! # #[derive(Protocol)]
//! # pub enum Example { //! # pub enum Example {