HFQR / xitca-web

Apache License 2.0
654 stars 41 forks source link

problem encountered for cargo run. how to debug? #1038

Closed sprappcom closed 2 weeks ago

sprappcom commented 2 weeks ago

cargo run xitca-http-multi-services

rustc -V rustc 1.81.0-nightly (684b3553f 2024-06-20)

   Compiling h3-quinn v0.0.6
   Compiling xitca-tls v0.3.0
   Compiling xitca-server v0.3.0
   Compiling xitca-http v0.5.0
   Compiling xitca-http-multi-services v0.1.0 (/usr/local/src/xitca-web/examples/multi-http-services)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 16.50s
     Running `/usr/local/src/xitca-web/examples/target/debug/xitca-http-multi-services`
thread 'main' panicked at /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rustls-0.23.10/src/crypto/mod.rs:259:14:
no process-level CryptoProvider available -- call CryptoProvider::install_default() before this point
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
fakeshadow commented 2 weeks ago

From the message the issue originated from rustls crate. You can add rustls = { version = "0.23", default-features = false, features = ["ring"] } in Cargo.toml to fix the runtime error.

On xitca-web's part CI only check for compile time error and this bug slip through. I'll push a fix later to address the issue.