hermit-os / hermit-rs

Hermit for Rust.
Apache License 2.0
1.69k stars 86 forks source link

How to make HTTP request. #636

Open kant2002 opened 2 weeks ago

kant2002 commented 2 weeks ago

I did try to create small console app which do only one HTTP request. But both reqwest and tokio do not work for me.

Reqwest produce following error.

error[E0583]: file not found for module `sys`
   --> C:\Users\User\.cargo\registry\src\index.crates.io-6f17d22bba15001f\socket2-0.5.7\src\lib.rs:179:1
    |
179 | mod sys;
    | ^^^^^^^^
    |
    = help: to create the module `sys`, create file "C:\Users\User\.cargo\registry\src\index.crates.io-6f17d22bba15001f\socket2-0.5.7\src\sys.rs" or "C:\Users\User\.cargo\registry\src\index.crates.io-6f17d22bba15001f\socket2-0.5.7\src\sys\mod.rs"
    = note: if there is a `mod sys` elsewhere in the crate already, import it with `use crate::...` instead

error: Socket2 doesn't support the compile target
   --> C:\Users\User\.cargo\registry\src\index.crates.io-6f17d22bba15001f\socket2-0.5.7\src\lib.rs:182:1
    |
182 | compile_error!("Socket2 doesn't support the compile target");
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Is there way to make HTTP request in Hermit? What direction should I take?