1 Star 0 Fork 7

XueLei / third_party_rust_tokio

forked from OpenHarmony / third_party_rust_tokio
关闭
 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

三方开源软件 tokio

tokio 简介

tokio 是一个事件驱动的Rust异步框架,用于支撑异步IO读写,并具有以下特性:

  • 性能高效:tokio的零成本抽象提供了极高的性能表现
  • 安全可靠:tokio借助了Rust语言特性,保证生命周期安全以及线程并发安全。

tokio主要提供了以下组件:

  • 基于多线程以及工作窃取的任务调度器
  • 监听各类操作系统事件的机制(epoll, kqueue, IOCP)
  • 异步TCP和UDP Sockets

tokio 基于 Rust 异步语义实现,具有零成本抽象,高性能,高并发等特点。

引入背景简述

Rust语言不自带异步调度框架,OpenHarmony 需要引入 tokio 的异步调度能力。借助于 tokio 的异步调度能力,提高 OpenHarmony 各异步化组件的性能。

任何 Rust 语言编写的组件需要用到异步调度的场景均可使用。

如何使用

在您的 BUILD.gn 需要的地方添加依赖即可。

 deps += [ "//third_party/rust/crate/tokio" ]

tokio原生使用文档: README.md

Copyright (c) 2023 Tokio Contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

暂无描述 展开 收起
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/xue-lei3/third_party_rust_tokio.git
git@gitee.com:xue-lei3/third_party_rust_tokio.git
xue-lei3
third_party_rust_tokio
third_party_rust_tokio
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891