programatik29 / rust-web-benchmarks

Benchmarking web frameworks written in rust with rewrk tool.
MIT License
248 stars 33 forks source link

Add Viz #15

Closed fundon closed 2 years ago

programatik29 commented 2 years ago

@fundon viz 0.2.0 doesn't compile.

fundon commented 2 years ago

I tested in stable & latest nightly.

If your nightly version is less than 2022-07-16, update it. The issue is https://github.com/rust-lang/rust/issues/99343.

# stable
rustc 1.62.0 (a8314ef7d 2022-06-27)
binary: rustc
commit-hash: a8314ef7d0ec7b75c336af2c9857bfaf43002bfc
commit-date: 2022-06-27
host: x86_64-apple-darwin
release: 1.62.0
LLVM version: 14.0.5
# nightly
rustc 1.64.0-nightly (d5e7f4782 2022-07-16)
binary: rustc
commit-hash: d5e7f4782e4b699728d0a08200ecd1a54d56a85d
commit-date: 2022-07-16
host: x86_64-apple-darwin
release: 1.64.0-nightly
LLVM version: 14.0.6
programatik29 commented 2 years ago

I updated it. Still doesn't compile. Error message:

error[E0432]: unresolved imports `http_body::LengthLimitError`, `http_body::Limited`
 --> .../viz-core-0.2.0/src/request.rs:3:17
  |
3 | use http_body::{LengthLimitError, Limited};
  |                 ^^^^^^^^^^^^^^^^  ^^^^^^^ no `Limited` in the root
  |                 |
  |                 no `LengthLimitError` in the root
programatik29 commented 2 years ago

I think the problem is viz-core depends on http-body 0.4 but it actually depends on http-body 0.4.5. I did cargo update which fixed this but there is definitely a problem.

fundon commented 2 years ago

Yes, I checked the http-body, LengthLimitError, Limited was added in 0.4.5.

I should lock the version.

programatik29 commented 2 years ago

Found some more problems in viz.

You should run this command: cargo hack check --each-feature --no-dev-deps.

Install cargo hack by cargo install cargo-hack if you haven't already.