Thread-per-Core Async Rust Made Simple

Cooperative thread-per-core framework for Rust & Linux based on io_uring

Star Fork
Get Started →
Overview

Glommio

Glommio (pronounced glo-mee-jow or |glomjəʊ|) is a Cooperative Thread-per-Core crate for Rust & Linux based on io_uring. Like other rust asynchronous crates, it allows you to write asynchronous code that takes advantage of rust async/await, but unlike its counterparts, it doesn't use helper threads anywhere.

Key Features

Getting Started

Using Glommio is not hard if you are familiar with rust async. All you have to do is:

use glommio::prelude::*;

LocalExecutorBuilder::default()
    .spawn(|| async move {
        // Create a file
        let file = OpenOptions::new()
            .write(true)
            .create(true)
            .open("example.txt")
            .await?;
        
        // Write data asynchronously
        file.write_at(b"Hello, Glommio!", 0).await?;
        
        Ok(())
    })
    .expect("failed to spawn executor")
    .join();

Requirements

Resources

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.