Skip to content

Commit 7216589

Browse files
authored
rust: bump ohkami to v0.24 (TechEmpower#10081)
* rust: bump ohkami to v0.24 * update rt_tokio impl
1 parent 5b77b0a commit 7216589

File tree

23 files changed

+1823
-2514
lines changed

23 files changed

+1823
-2514
lines changed

frameworks/Rust/ohkami/rt_async-std/Cargo.lock renamed to frameworks/Rust/ohkami/Cargo.lock

Lines changed: 1032 additions & 1162 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frameworks/Rust/ohkami/Cargo.toml

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
[package]
22
name = "framework_benchmarks"
3-
version = "0.21.0"
4-
edition = "2021"
3+
version = "0.24.0"
4+
edition = "2024"
55
authors = ["kanarus <[email protected]>"]
66

77
[dependencies]
8-
ohkami = { version = "0.21" }
9-
yarte = { optional = true, version = "0.15" }
10-
futures-util = { optional = true, version = "0.3" }
11-
rand = { optional = true, version = "0.8", features = ["small_rng"] }
12-
sqlx = { optional = true, version = "0.8", features = ["postgres", "tls-native-tls"] }
8+
ohkami = { version = "0.24" }
9+
tokio = { optional = true, version = "1.47", features = ["rt"] }
10+
tokio-postgres = { optional = true, version = "0.7" }
11+
yarte = { optional = true, version = "0.15" }
12+
futures-util = { optional = true, version = "0.3" }
13+
rand = { optional = true, version = "0.8", features = ["small_rng"] }
1314

1415
[features]
15-
db = ["yarte", "futures-util", "rand", "sqlx"]
16-
rt_tokio = ["ohkami/rt_tokio", "db", "sqlx/runtime-tokio"]
17-
rt_async-std = ["ohkami/rt_async-std", "db", "sqlx/runtime-async-std"]
18-
rt_smol = ["ohkami/rt_smol"]
19-
rt_glommio = ["ohkami/rt_glommio"]
20-
rt_nio = ["ohkami/rt_nio"]
16+
rt_tokio = ["ohkami/rt_tokio", "tokio", "tokio-postgres", "yarte", "futures-util", "rand"]
17+
rt_smol = ["ohkami/rt_smol"]
18+
rt_glommio = ["ohkami/rt_glommio"]
19+
rt_nio = ["ohkami/rt_nio"]

frameworks/Rust/ohkami/README.md

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,10 @@
1-
# [Ohkami](https://github.com/kana-rus/ohkami) - Intuitive and Declarative Web Framework for Rust
1+
# [Ohkami](https://github.com/ohkami-rs/ohkami) - A performant, declarative, and runtime-flexible web framework for Rust
22

3-
## Description
3+
## Features
44

5-
> Build web app in intuitive and declarative code
6-
> - *macro-less and type-safe* APIs for intuitive and declarative code
7-
> - *multi runtime* support:`tokio`, `async-std`, `worker` (Cloudflare Workers)
8-
9-
- [User Guide](https://docs.rs/ohkami/latest/ohkami/)
10-
- [API Documentation](https://docs.rs/ohkami/latest/ohkami/)
11-
- Cargo package: [ohkami](https://crates.io/crates/ohkami)
12-
13-
## Database
14-
15-
PostgreSQL with [sqlx](https://github.com/launchbadge/sqlx)
5+
> - *macro-less and type-safe* APIs for declarative, ergonomic code
6+
> - *runtime-flexible*`tokio`, `smol`, `nio`, `glommio` and `worker` (Cloudflare Workers), `lambda` (AWS Lambda)
7+
> - good performance, no-network testing, well-structured middlewares, Server-Sent Events, WebSocket, highly integrated OpenAPI document generation, ...
168
179
## Test URLs
1810

@@ -38,4 +30,4 @@ PostgreSQL with [sqlx](https://github.com/launchbadge/sqlx)
3830

3931
### 6. Plaintext
4032

41-
http://localhost:8000/plaintext
33+
http://localhost:8000/plaintext

frameworks/Rust/ohkami/benchmark_config.json

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -23,27 +23,6 @@
2323
"update_url": "/updates?q=",
2424
"plaintext_url": "/plaintext"
2525
},
26-
"rt_async-std": {
27-
"dockerfile": "rt_async-std.dockerfile",
28-
"display_name": "Ohkami [async-std]",
29-
"framework": "Ohkami",
30-
"webserver": "Ohkami",
31-
"language": "Rust",
32-
"approach": "Realistic",
33-
"classification": "Micro",
34-
"database": "Postgres",
35-
"orm": "Raw",
36-
"platform": "None",
37-
"os": "Linux",
38-
"database_os": "Linux",
39-
"port": 8000,
40-
"json_url": "/json",
41-
"db_url": "/db",
42-
"query_url": "/queries?q=",
43-
"fortune_url": "/fortunes",
44-
"update_url": "/updates?q=",
45-
"plaintext_url": "/plaintext"
46-
},
4726
"rt_smol": {
4827
"dockerfile": "rt_smol.dockerfile",
4928
"display_name": "Ohkami [smol]",

frameworks/Rust/ohkami/rt_async-std.dockerfile

Lines changed: 0 additions & 26 deletions
This file was deleted.

frameworks/Rust/ohkami/rt_async-std/Cargo.toml

Lines changed: 0 additions & 14 deletions
This file was deleted.

frameworks/Rust/ohkami/rt_async-std/src/main.rs

Lines changed: 0 additions & 5 deletions
This file was deleted.

frameworks/Rust/ohkami/rt_glommio.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM rust:1.84-slim-bookworm AS builder
1+
FROM rust:1.89-slim-bookworm AS builder
22

33
RUN apt update && apt install -y --no-install-recommends \
44
pkg-config \

frameworks/Rust/ohkami/rt_glommio/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "framework_benchmarks-glommio"
33
version = "0.0.0"
4-
edition = "2021"
4+
edition = "2024"
55
authors = ["kanarus <[email protected]>"]
66

77
[profile.release]
@@ -12,4 +12,4 @@ codegen-units = 1
1212
[dependencies]
1313
framework_benchmarks = { path = "..", features = ["rt_glommio"] }
1414
glommio = { version = "0.9" }
15-
num_cpus = { version = "1.16" }
15+
num_cpus = { version = "1.17" }
Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
use glommio::{LocalExecutorPoolBuilder, PoolPlacement, CpuSet};
22

33
fn main() {
4-
LocalExecutorPoolBuilder::new(PoolPlacement::MaxSpread(
5-
num_cpus::get(), CpuSet::online().ok()
6-
)).on_all_shards(|| async {
7-
framework_benchmarks::ohkami().await
8-
.howl("0.0.0.0:8000").await
9-
}).unwrap().join_all();
4+
LocalExecutorPoolBuilder::new(PoolPlacement::MaxSpread(num_cpus::get(), CpuSet::online().ok()))
5+
.on_all_shards(|| async {
6+
framework_benchmarks::ohkami().await
7+
.howl("0.0.0.0:8000").await
8+
})
9+
.unwrap()
10+
.join_all();
1011
}

0 commit comments

Comments
 (0)