hyper README

The project's README from github.com/hyperium/hyper. As one markdown file: README.md.

hyper

crates.io Released API docs MIT licensed CI Discord chat

A protective and efficient HTTP library for all.

Get started by looking over the guides.

"Low-level"

hyper is a relatively low-level library, meant to be a building block for libraries and applications.

If you are looking for a convenient HTTP client, then you may wish to consider reqwest.

If you are not sure what HTTP server to choose, then you may want to consider axum or warp, the latter taking a more functional approach. Both are built on top of this library.

Contributing

To get involved, take a look at CONTRIBUTING.

If you prefer chatting, there is an active community in the Discord server.

License

hyper is provided under the MIT license. See LICENSE.

hyper (hyperium/hyper)

Searching Database…

16.4K ·GitHub
这是什么?hyper 是 Rust 的一个 HTTP 库,同时提供客户端和服务端 API,支持 HTTP/1 和 HTTP/2。
它是用来构建应用的框架,还是更底层的工具?它是一个库,不是框架——刻意设计得比较底层,目的是作为其他库和应用的基础构件。
我该怎么上手?README 推荐从它的指南入手;实际操作就是在你的 Cargo.toml 中把 hyper 添加为依赖,然后照着指南做。
除了 Rust 之外我还需要别的东西吗?只需要 Rust 工具链——hyper 是一个 Cargo crate,README 没有提到系统库或服务之类的其他前置条件。
我应该直接用 hyper,还是有更友好的上层选择?通常选后者:README 建议用 reqwest 作为方便的客户端,用 axum 或 warp 搭建服务端,它们都是构建在 hyper 之上的。当你需要底层控制能力时,再直接用 hyper。
作为应用开发者我会用到它,还是它主要面向库作者?两者都是:既适合需要在 Rust 中处理 HTTP 的应用开发者,也适合想要一个经过验证的底层基础来构建的框架或库作者。
可以在商业项目中使用吗?可以——hyper 采用 MIT 许可证发布,个人和商业使用都是免费的。
异步设计为什么重要?异步 I/O 让单个进程无需为每个连接分配一个线程,就能同时处理海量的连接——这正是 hyper 宣称性能领先背后的机制。
它经受过生产环境的考验吗?是的——README 提到它已被广泛用于生产环境,称这个库经过充分测试、正确可靠,并宣称性能领先。
hyper 还在积极维护吗?是的——这个项目始于 2014 年,在 GitHub 上有超过 16,000 颗星,而且它的仓库配有 CI、基准测试和 cargo-audit 工作流。
What are similar projects?axum, fasthttp, Rocket, warp, reqwest, grpc-rust, guzzle, got
Creator
hyperium
Size
20.5 MB
Stars
16.4K
Age
12y
Commits · 90 Days