Skip to main content

TeaQL Rust Module Now Supports Linux

· 2 min read
TeaQL Team
Core Team

TeaQL's Rust ecosystem now includes a Linux provider that executes generated domain queries against procfs data.

Querying Linux Through Domain APIs

The provider models system, process, and thread information as domain entities. Applications can filter, order, paginate, and navigate relationships through generated APIs while the provider remains responsible for parsing /proc.

Here is a quick example of how simple it is to query your data now:

use linux_system_info_core::{Q, Process};
use teaql::runtime::QueryContext;

async fn fetch_high_memory_processes(ctx: &QueryContext) -> Result<Vec<Process>, teaql::core::error::TeaQLError> {
let procs = Q::processes_minimal()
.select_pid()
.select_name()
.select_memory_rss_kb()
.with_memory_rss_kb_greater_than(1024_000_i64) // Over 1GB memory
.page(1, 10)
.comment("Query top memory processes for monitoring")
.purpose("Check system health")
.execute_for_list(ctx)
.await?;

Ok(procs)
}

The generated query contract separates the application layer from procfs parsing. Field and method changes are visible to the Rust compiler instead of remaining embedded in string-based file parsing.

See the Complete Example

The full example registers teaql-provider-linux, builds four process leaderboards, and adds process-to-thread drill-down in a ratatui interface:

Turning Linux /proc into Domain Queries with TeaQL Rust

Its runnable source is available in the teaql-rust-app-examples repository.