Skip to content

Commit eb5a286

Browse files
authored
[xitca-web] new async runtime variant and header fix (#9322)
* [xitca-web] reduce duplicate code and header fix * query parse fix * enable new variant of tokio runtime
1 parent 8d4f5ed commit eb5a286

File tree

14 files changed

+314
-344
lines changed

14 files changed

+314
-344
lines changed

frameworks/Rust/xitca-web/.cargo/config.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[build]
2-
rustflags = ["-C", "target-cpu=native"]
2+
rustflags = ["-C", "target-cpu=native", "--cfg", "tokio_unstable"]
33
incremental = false
44

55
[target.wasm32-wasip1-threads]

frameworks/Rust/xitca-web/Cargo.lock

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

frameworks/Rust/xitca-web/Cargo.toml

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ path = "./src/main.rs"
99
required-features = ["io-uring", "pg", "router", "template"]
1010

1111
[[bin]]
12-
name = "xitca-web-iou"
13-
path = "./src/main_iou.rs"
14-
required-features = ["io-uring", "perf", "pg", "template"]
12+
name = "xitca-web-unrealistic"
13+
path = "./src/main_unrealistic.rs"
14+
required-features = ["perf", "pg", "template"]
1515

1616
[[bin]]
1717
name = "xitca-web-wasm"
@@ -34,7 +34,7 @@ pg = ["dep:xitca-postgres"]
3434
# diesel orm optional
3535
pg-orm = ["diesel/r2d2"]
3636
# diesel async orm optional
37-
pg-orm-async = ["dep:diesel", "dep:diesel-async", "dep:xitca-postgres-diesel", "futures-util"]
37+
pg-orm-async = ["dep:diesel", "dep:diesel-async", "dep:xitca-postgres-diesel", "dep:futures-util"]
3838
# http router optional
3939
router = ["xitca-http/router"]
4040
# web optional
@@ -64,7 +64,7 @@ serde_json = { version = "1" }
6464
xitca-web = { version = "0.7", features = ["json"], optional = true }
6565

6666
# raw-pg optional
67-
xitca-postgres = { version = "0.2", optional = true }
67+
xitca-postgres = { version = "0.3", optional = true }
6868

6969
# orm optional
7070
diesel = { version = "2", features = ["postgres"], optional = true }
@@ -100,9 +100,11 @@ xitca-postgres-diesel = { git = "https://github.com/fakeshadow/xitca-postgres-di
100100

101101
diesel-async = { git = "https://github.com/weiznich/diesel_async", rev = "5b8262b" }
102102
mio = { git = "https://github.com/fakeshadow/mio", rev = "9bae6012b7ecfc6083350785f71a5e8265358178" }
103-
104-
xitca-codegen = { git = "http://github.com/HFQR/xitca-web", rev = "d3066ba" }
105-
xitca-http = { git = "http://github.com/HFQR/xitca-web", rev = "d3066ba" }
106-
xitca-server = { git = "http://github.com/HFQR/xitca-web", rev = "d3066ba" }
107-
xitca-service = { git = "http://github.com/HFQR/xitca-web", rev = "d3066ba" }
108-
xitca-web = { git = "http://github.com/HFQR/xitca-web", rev = "d3066ba" }
103+
tokio = { git = "https://github.com/tokio-rs/tokio.git", rev = "512e9de" }
104+
105+
xitca-codegen = { git = "http://github.com/HFQR/xitca-web", rev = "1de8d9c" }
106+
xitca-http = { git = "http://github.com/HFQR/xitca-web", rev = "1de8d9c" }
107+
xitca-postgres = { git = "http://github.com/HFQR/xitca-web", rev = "1de8d9c" }
108+
xitca-server = { git = "http://github.com/HFQR/xitca-web", rev = "1de8d9c" }
109+
xitca-service = { git = "http://github.com/HFQR/xitca-web", rev = "1de8d9c" }
110+
xitca-web = { git = "http://github.com/HFQR/xitca-web", rev = "1de8d9c" }

frameworks/Rust/xitca-web/benchmark_config.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"notes": "",
2525
"versus": ""
2626
},
27-
"iou": {
27+
"unrealistic": {
2828
"json_url": "/json",
2929
"plaintext_url": "/plaintext",
3030
"db_url": "/db",
@@ -42,7 +42,7 @@
4242
"webserver": "xitca-server",
4343
"os": "Linux",
4444
"database_os": "Linux",
45-
"display_name": "xitca-web [iou]",
45+
"display_name": "xitca-web [unrealistic]",
4646
"notes": "",
4747
"versus": ""
4848
},

0 commit comments

Comments
 (0)