MCPcopy Index your code
hub / github.com/DataDog/glommio

github.com/DataDog/glommio @v0.8.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.8.0 ↗ · + Follow
2,034 symbols 5,508 edges 103 files 489 documented · 24%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

glommio

crates.io docs.rs license project chat CI

Join our Zulip community!

If you are interested in Glommio, consider joining our Zulip community. Tell us about exciting applications you are building, ask for help, or just chat with friends 😃

What is 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 one to write asynchronous code that takes advantage of rust async/await, but unlike its counterparts, it doesn't use helper threads anywhere.

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 {
    /// your async code here
})
.expect("failed to spawn local executor")
.join();

For more details check out our docs page and an introductory article.

Supported Rust Versions

Glommio is built against the latest stable release. The minimum supported version is 1.58. The current Glommio version is not guaranteed to build on Rust versions earlier than the minimum supported version.

Supported Linux kernels

Glommio requires a kernel with a recent enough io_uring support, at least current enough to run discovery probes. The minimum version at this time is 5.8.

Please also note Glommio requires at least 512 KiB of locked memory for io_uring to work. You can increase the memlock resource limit (rlimit) as follows:

$ vi /etc/security/limits.conf
*    hard    memlock        512
*    soft    memlock        512

Please note that 512 KiB is the minimum needed to spawn a single executor. Spawning multiple executors may require you to raise the limit accordingly.

To make the new limits effective, you need to log in to the machine again. You can verify that the limits are updated by running the following:

$ ulimit -l
512

Contributing

See Contributing.

License

Licensed under either of

  • Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
  • MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)

at your option.

Extension points exported contracts — how you extend this code

UringReadBuf (Interface)
A buffer that can be used to prepare read events. [6 implementers]
glommio/src/iou/registrar/registered.rs
UringWriteBuf (Interface)
A buffer that can be used to prepare write events. [5 implementers]
glommio/src/iou/registrar/registered.rs
Handler (Interface)
Trait for handling sharded messages [5 implementers]
glommio/src/channels/sharding.rs
IoVec (Interface)
An interface to an IO vector. [3 implementers]
glommio/src/io/bulk_io.rs
SharesManager (Interface)
The SharesManager allows the user to implement dynamic shares for a [`TaskQueue`] In terms of behavior, a [`TaskQueue`] [2 …
glommio/src/shares.rs

Core symbols most depended-on inside this repo

clone
called by 163
glommio/src/task/raw.rs
as_ref
called by 101
glommio/src/iou/registrar/registered.rs
executor
called by 94
glommio/src/executor/mod.rs
join
called by 88
glommio/src/executor/mod.rs
as_ptr
called by 87
glommio/src/sys/uring.rs
get
called by 85
glommio/src/net/stream.rs
spawn
called by 85
glommio/src/sync/gate.rs
len
called by 79
glommio/src/sys/dma_buffer.rs

Shape

Method 1,209
Function 507
Class 253
Enum 49
Interface 16

Languages

Rust97%
C3%

Modules by API surface

glommio/src/executor/mod.rs148 symbols
glommio/src/sys/uring.rs112 symbols
glommio/src/executor/placement/mod.rs63 symbols
glommio/src/iou/sqe.rs61 symbols
glommio/src/reactor.rs58 symbols
glommio/src/io/dma_file_stream.rs58 symbols
glommio/rusturing.c58 symbols
glommio/src/net/udp_socket.rs56 symbols
glommio/src/net/tcp_socket.rs55 symbols
glommio/src/sync/rwlock.rs54 symbols
glommio/src/sync/semaphore.rs47 symbols
glommio/src/channels/local_channel.rs47 symbols

For agents

$ claude mcp add glommio \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact