【文件属性】:
文件名称:async-std-hyper:如何在async-std上运行Hyper
文件大小:13KB
文件格式:ZIP
更新时间:2021-04-26 05:05:10
Rust
如何在async-std上运行Hyper
这是一个简单的示例,显示了如何在上运行 。
指示
步骤1:依赖关系
将async-std , hyper和tokio作为依赖项添加到您的板条箱中:
[ dependencies ]
async-std = " 1 "
hyper = { version = " 0.13 " , default-features = false }
tokio = { version = " 0.2 " , default-features = false }
步骤2:相容层
将此compat模块复制到板条箱中:
pub mod compat {
use std :: pin :: Pin;
use std :: task :: {Context, Poll};
use async_std :: io;
use async_st
【文件预览】:
async-std-hyper-master
----.gitignore(8B)
----LICENSE-MIT(1023B)
----README.md(4KB)
----Cargo.toml(262B)
----LICENSE-APACHE(11KB)
----src()
--------main.rs(3KB)
----Cargo.lock(29KB)