Skip to content

Commit

Permalink
refactor directory structure
Browse files Browse the repository at this point in the history
  • Loading branch information
kanarus committed Aug 23, 2024
1 parent b88249f commit 5fad961
Show file tree
Hide file tree
Showing 13 changed files with 37 additions and 54 deletions.
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ members = [
]
exclude = [
"benches",
"benches_smol",
"benches_tokio",
"benches_glommio",
"benches_vs_actix-web",
"benches_rt/glommio",
"benches_rt/smol",
"benches_rt/tokio",
"benches_rt/vs_actix-web",
]

[workspace.dependencies]
Expand Down
12 changes: 10 additions & 2 deletions Taskfile.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
version: '3'

tasks:
CI:
deps:
- test
- check
- bench_dryrun

test:
deps:
- test_doc
Expand All @@ -25,8 +31,10 @@ tasks:
cmds:
- cd benches && cargo bench --features DEBUG --no-run
- cd benches && cargo check
- cd benches_glommio && cargo check
- cd benches_smol && cargo check
- cd benches_rt/glommio && cargo check
- cd benches_rt/smol && cargo check
- cd benches_rt/tokio && cargo check
- cd benches_rt/vs_actix-web && cargo check

bench:
dir: benches
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ authors = ["kanarus <[email protected]>"]

[dependencies]
# set `default-features = false` to assure "DEBUG" feature be off even when DEBUGing `../ohkami`
ohkami = { path = "../ohkami", default-features = false, features = ["rt_glommio"] }
ohkami = { path = "../../ohkami", default-features = false, features = ["rt_glommio"] }
glommio = { version = "0.9" }

[profile.release]
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion benches_smol/Cargo.toml → benches_rt/smol/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ authors = ["kanarus <[email protected]>"]

[dependencies]
# set `default-features = false` to assure "DEBUG" feature be off even when DEBUGing `../ohkami`
ohkami = { path = "../ohkami", default-features = false, features = ["rt_smol"] }
ohkami = { path = "../../ohkami", default-features = false, features = ["rt_smol"] }
smol = { version = "2" }

[profile.release]
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion benches_tokio/Cargo.toml → benches_rt/tokio/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ authors = ["kanarus <[email protected]>"]

[dependencies]
# set `default-features = false` to assure "DEBUG" feature be off even when DEBUGing `../ohkami`
ohkami = { path = "../ohkami", default-features = false, features = ["rt_tokio"] }
ohkami = { path = "../../ohkami", default-features = false, features = ["rt_tokio"] }
tokio = { version = "1", features = ["full"] }

[profile.release]
Expand Down
20 changes: 20 additions & 0 deletions benches_rt/tokio/src/bin/hello.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
use ohkami::prelude::*;
use ohkami::format::JSON;

#[derive(Serialize)]
struct Message {
message: String
}

async fn hello(name: &str) -> JSON<Message> {
JSON(Message {
message: format!("Hello, {name}!")
})
}

#[tokio::main]
async fn main() {
Ohkami::new((
"/hello/:name".GET(hello),
)).howl("localhost:3000").await
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
45 changes: 0 additions & 45 deletions benches_tokio/src/bin/hello.rs

This file was deleted.

0 comments on commit 5fad961

Please sign in to comment.