Skip to content

Commit

Permalink
Feature: monoio runtime support
Browse files Browse the repository at this point in the history
- Add monoio runtime in a separate crate.

- Test: test MonoioRuntime with `Suite::test_all()`

- Add CI: run monoio unit tests with a separate job, because it does
  belong to the workspace
  • Loading branch information
SteveLauC authored and drmingdrmer committed Aug 7, 2024
1 parent c6f4a77 commit b72ea56
Show file tree
Hide file tree
Showing 5 changed files with 472 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,33 @@ jobs:
RUST_LOG: debug
RUST_BACKTRACE: full


# Test external crate.
rt-monoio:
runs-on: ubuntu-latest

steps:
- name: Setup | Checkout
uses: actions/checkout@v2


- name: Setup | Toolchain
uses: actions-rs/[email protected]
with:
toolchain: "nightly"
override: true


- name: Unit Tests
uses: actions-rs/cargo@v1
with:
command: test
args: --tests --manifest-path "rt-monoio/Cargo.toml"
env:
RUST_LOG: debug
RUST_BACKTRACE: full


# Feature "serde" will be enabled if one of the member crates enables
# "serde", such as `memstore`, when building a cargo workspace.
#
Expand Down
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,5 @@ exclude = [
"examples/raft-kv-memstore-network-v2",
"examples/raft-kv-memstore-opendal-snapshot-data",
"examples/raft-kv-rocksdb",
"rt-monoio"
]
23 changes: 23 additions & 0 deletions rt-monoio/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[package]
name = "openraft-rt-monoio"
description = "monoio AsyncRuntime support for Openraft"
documentation = "https://docs.rs/openraft-rt-monoio"
readme = "README.md"
version = "0.10.0"
edition = "2021"
authors = [
"Databend Authors <[email protected]>",
]
categories = ["algorithms", "asynchronous", "data-structures"]
homepage = "https://github.com/datafuselabs/openraft"
keywords = ["raft", "consensus"]
license = "MIT OR Apache-2.0"
repository = "https://github.com/datafuselabs/openraft"

[dependencies]
openraft = { path = "../openraft", version = "0.10.0", default-features = false, features = ["singlethreaded"] }

rand = "0.8"
tokio = { version = "1.22", features = ["sync"] }
monoio = "0.2.3"
local-sync = "0.1.1"
5 changes: 5 additions & 0 deletions rt-monoio/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# openraft-rt-monoio

monoio [`AsyncRuntime`][rt_link] support for Openraft.

[rt_link]: https://docs.rs/openraft/latest/openraft/async_runtime/trait.AsyncRuntime.html
Loading

0 comments on commit b72ea56

Please sign in to comment.