Skip to content

Commit

Permalink
Add provider traits to all runtime components (#77)
Browse files Browse the repository at this point in the history
* Add provider Sleeper trait for CanSleep

* Group runtime components in tokio-runtime-components crate

* Prototype on forwarding all components without violating orphan rules

* Use new cgp-component crate for auto implementing delegation marker traits

* Remove ToBeDelegated trait

* Add provider trait for HasMutex

* Add provider trait for HasStreamType

* Add provider trait for CanRunConcurrentTasks with parallel runner impl

* Add concurrent task runner

* Add concurrent runtime component graph separately from parallel version

* Add provider trait for stream mapper

* Introduce new async-runtime-components crate and move non-tokio components there

* Move subscription constructs to async-runtime-components

* Slightly organize stream and task modules

* Move mutex component to async-runtime-components

* Add provider trait for HasTime

* Add provider trait for HasChannelTypes

* Add provider trait for CanUseChannels

* Add provider trait for CanStreamReceiver

* Add provider trait for CanCloneSender

* Remove ibc-relayer-subscription crate

* Add non-Tokio version of channel types

* Use non-tokio version of channel type

* Add provider trait for channel-once types

* Reorganize channel modules

* Add provider trait for task spawner

* Add back Tokio channel impl. Somehow futures channel is not working

* Fix errors

* Fix error handling in futures version of receiver
  • Loading branch information
soareschen authored Dec 21, 2023
1 parent 291b0ab commit 8cb906d
Show file tree
Hide file tree
Showing 86 changed files with 1,506 additions and 495 deletions.
75 changes: 38 additions & 37 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 7 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ members = [
"crates/relayer-cosmos-mock",
"crates/relayer-runtime",
"crates/relayer-solomachine",
"crates/relayer-subscription",
"crates/relayer-mock",
"crates/test-components",
"crates/test-suite",
Expand Down Expand Up @@ -53,17 +52,21 @@ tokio = { version = "1.34" }
tracing = { version = "0.1.40" }
tonic = { version = "0.10" }
toml = { version = "0.8.8" }
futures = { version = "0.3" }
futures = { version = "0.3.29", default-features = false }
futures-core = { version = "0.3.29", default-features = false }
futures-util = { version = "0.3.29", default-features = false }
futures-channel = { version = "0.3.29", default-features = false }
eyre = { version = "0.6.8" }
itertools = { version = "0.11" }
http = { version = "0.2.10" }
flex-error = { version = "0.4.4", default-features = false }

ibc-relayer-components = { version = "0.1.0", path = "./crates/relayer-components" }
ibc-relayer-components-extra = { version = "0.1.0", path = "./crates/relayer-components-extra" }
ibc-relayer-runtime = { version = "0.1.0", path = "./crates/relayer-runtime" }
ibc-relayer-subscription = { version = "0.1.0", path = "./crates/relayer-subscription" }
cosmos-client-components = { version = "0.1.0", path = "./crates/cosmos-client-components" }
cosmos-test-components = { version = "0.1.0", path = "./crates/cosmos-test-components" }
async-runtime-components = { version = "0.1.0", path = "./crates/async-runtime-components" }
tokio-runtime-components = { version = "0.1.0", path = "./crates/tokio-runtime-components" }
ibc-relayer-cosmos = { version = "0.1.0", path = "./crates/relayer-cosmos" }
ibc-relayer-solomachine = { version = "0.1.0", path = "./crates/relayer-solomachine" }
Expand All @@ -82,7 +85,7 @@ basecoin-store = { git = "https://github.com/informalsystems/basecoin-rs.gi

cgp-core = { git = "https://github.com/informalsystems/cgp.git", branch = "main" }
cgp-component = { git = "https://github.com/informalsystems/cgp.git", branch = "main" }
cgp-component-macro = { git = "https://github.com/informalsystems/cgp.git", branch = "main" }
cgp-component-macro = { git = "https://github.com/informalsystems/cgp.git", branch = "soares/fix-impl-gat-bounds" }
cgp-error = { git = "https://github.com/informalsystems/cgp.git", branch = "main" }
cgp-error-eyre = { git = "https://github.com/informalsystems/cgp.git", branch = "main" }
cgp-async = { git = "https://github.com/informalsystems/cgp.git", branch = "main" }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "ibc-relayer-subscription"
name = "async-runtime-components"
version = { workspace = true }
edition = { workspace = true }
license = { workspace = true }
Expand All @@ -9,19 +9,17 @@ authors = { workspace = true }
rust-version = { workspace = true }
readme = "README.md"
description = """
Implementation of an IBC Relayer in Rust, as a library
Modular runtime components implemented using Tokio
"""

[package.metadata.docs.rs]
all-features = true

[features]

[dependencies]
ibc-relayer-components = { workspace = true }
ibc-relayer-components-extra = { workspace = true }
cgp-core = { workspace = true }
async-trait = { workspace = true }
ibc-test-components = { workspace = true }

cgp-core = { workspace = true }
futures-core = { workspace = true }
futures-util = { workspace = true }
futures-channel = { workspace = true }

futures-core = { version = "0.3", default-features = false, features = ["alloc"] }
futures-util = { version = "0.3", default-features = false, features = ["alloc"] }
rand = { version = "0.8.5" }
Loading

0 comments on commit 8cb906d

Please sign in to comment.