Expand description
Hiver Runtime - High-performance async runtime Hiver运行时 - 高性能异步运行时
§Overview / 概述
hiver-runtime provides a high-performance async runtime based on io-uring
with thread-per-core architecture for maximum scalability.
hiver-runtime 提供基于io-uring的高性能异步运行时,采用thread-per-core架构
以实现最大可扩展性。
§Features / 功能
- io-uring based I/O (Linux) / 基于io-uring的I/O(Linux)
- epoll/kqueue fallback / epoll/kqueue回退支持
- Thread-per-core scheduler / Thread-per-core调度器
- Timer wheel for efficient timers / 高效定时器的时间轮
- Zero-copy I/O primitives / 零拷贝I/O原语
§Example / 示例
ⓘ
use hiver_runtime::Runtime;
fn main() -> std::io::Result<()> {
let runtime = Runtime::new()?;
runtime.block_on(async {
println!("Hello, Hiver!");
});
Ok(())
}Re-exports§
pub use channel::Receiver;pub use channel::RecvError;pub use channel::SendError;pub use channel::Sender;pub use channel::bounded;pub use channel::unbounded;pub use driver::Driver;pub use driver::DriverConfig;pub use driver::DriverConfigBuilder;pub use driver::DriverFactory;pub use driver::DriverType;pub use runtime::Runtime;pub use runtime::RuntimeBuilder;pub use runtime::RuntimeConfig;pub use scheduler::Scheduler;pub use scheduler::SchedulerConfig;pub use scheduler::SchedulerHandle;pub use scheduler::WorkStealingConfig;pub use scheduler::WorkStealingHandle;pub use scheduler::WorkStealingScheduler;pub use scheduler::gen_task_id;pub use select::SelectMultiple;pub use select::SelectMultipleOutput;pub use select::SelectTwo;pub use select::SelectTwoOutput;pub use select::select_multiple;pub use select::select_two;pub use task::JoinError;pub use task::JoinHandle;pub use task::spawn;pub use time::sleep;pub use time::sleep_until;
Modules§
- channel
- Multi-producer, single-consumer channels for async communication 用于异步通信的多生产者、单消费者通道
- driver
- Driver module for async I/O operations 异步I/O操作的Driver模块
- io
- I/O operations module I/O操作模块
- runtime
- Runtime module 运行时模块
- scheduler
- Task scheduler module 任务调度器模块
- select
- Select macro for waiting on multiple async operations 用于等待多个异步操作的select宏
- task
- Task management module 任务管理模块
- time
- Timer module 定时器模块