How Apache DataFusion Runs SQL In-Process
Apache DataFusion is an embeddable query engine: SQL goes in, runs as columnar Arrow batches inside your own process, and results come out without a separate service.
Loading…
Topic
77 posts about Rust. Every summary links to the original.
See the idea
Apache DataFusion is an embeddable query engine: SQL goes in, runs as columnar Arrow batches inside your own process, and results come out without a separate service.
Axum is a Rust web framework for composing routes, middleware, and extractors. This explainer shows how different login flows become verified identity before a handler responds.
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
Newest first
Rig is an open-source Rust library that provides a common interface for LLM providers including OpenAI, Anthropic, and Gemini, avoiding application rewrites when switching services. It structures applications around a provider client, completion model, agent, preamble, and registered tools, with async APIs handling provider network requests. In the Rat Code demo, built with Ratatui, separate tools read and write files and run shell commands, while Rig’s streaming API updates the terminal as responses arrive. The library also supports RAG through vector store abstractions, local inference via Ollama, llama.cpp, or Candle, and cassette-based integration tests that replay recorded HTTP interactions in CI; live model quality requires separate scheduled testing.
JetBrains IDEs have supported WSL through several architectures, but the 2026.2 release makes Native mode the recommended entry point for projects stored there. In Native mode, the Windows IDE delegates filesystem and process operations to the Rust-based IJent agent inside WSL, with EelApi abstracting local and remote environments for IDE and plugin code. Earlier approaches included 9P filesystem access, WSLg, and Remote Development, with problems involving symlink handling, latency, GUI limitations, installation overhead, and client–backend communication costs. Performance tests on a cold first open of spring-framework measured Native mode at 11.5 seconds to become ready versus 18.5 seconds for 9P, while project-tree scanning took 3.7 versus 8.1 seconds. Remote Development remains available, but direct project opening is now preferred in IntelliJ IDEA, WebStorm, and PhpStorm.
NVIDIA’s CUDA Rust effort targets the GPU-kernel gap in Rust-based systems, where host code can be Rust but kernels often require another language. It presents two tracks: cuda-oxide compiles #[kernel] functions through Rust MIR, Pliron, and LLVM IR to PTX for SIMT programming, while cutile-rs expresses computations as tiles and JIT-compiles embedded ASTs through CUDA Tile IR. The SIMT example uses DisjointSlice, typed thread indices, and launch contracts to constrain per-thread output access and validate launch configuration; Tile leaves thread mapping and shared-memory management to its compiler. The post recommends starting with Tile because the compiler decides tile mapping per architecture, and using SIMT when explicit thread or memory control is needed. Both projects are early-stage, with cuda-oxide in early alpha and cutile-rs further along but still incomplete and subject to API changes.
Rust’s type system prevents many memory-safety bugs, but it does not prove that programs compute intended results, avoid leaks, or correctly handle every unsafe and concurrent operation. Verus is an open-source automated program verifier that checks Rust implementations against formal specifications for all possible inputs, using solvers to discharge proof obligations while developers provide guidance such as loop invariants. Specifications and proofs use Rust-like requires and ensures annotations written alongside the code, while ordinary Rust compilers ignore them and Verus typically returns feedback in under a second. The tool can prove properties of unsafe code, lock invariants, and concurrent systems, and Amazon has used it for key Nitro Isolation Engine primitives and other critical infrastructure.
CLI applications cannot use a standard browser redirect OAuth login flow when no browser or redirect URL is available, so the tutorial uses OAuth 2.0 Device Authorization Flow. It builds an end-to-end Rust workspace containing a CLI, a shared auth-lib crate, and an Axum API configured with Auth0. The CLI requests a device code, displays a verification URL and user code, polls for an ID token and access token, then sends the access token as a Bearer credential. The API middleware fetches JWKS, selects the key matching the JWT’s kid, validates RS256 signatures plus issuer and audience claims, and deserializes strongly typed UserClaims. With valid claims, a protected route returns a message and subject; otherwise the extractor returns an unauthorized response.
Cloudflare's Big Pineapple platform, which powers 1.1.1.1 and other DNS services, stores over 250 billion cache entries simultaneously. To decrease fleet-wide memory consumption, engineers implemented five changes to in-memory cache data structures. Key modifications included swapping growable types like Vec and String for Box slices to eliminate capacity overhead, combining distinct record sections into a single list indexed by offsets, omitting redundant owner domain names, and serializing record bytes into contiguous buffers. In benchmarks, these optimizations decreased per-entry memory footprints by 56% while improving cache lookup latency by 19% and insert throughput by 43%. Across production instances, the rollout reduced working-set memory by approximately 100 terabytes.
Canonical is selectively adopting Rust to rewrite core system utilities across Ubuntu releases to improve memory safety, security, and long-term resilience. Starting in Ubuntu 26.04 LTS, uutils coreutils shipped as the default implementation targeting complete GNU compatibility, alongside sudo-rs, which introduced intentional behavior changes like asterisk display on password entry. Canonical is also funding ntpd-rs to consolidate NTP, NTS, and PTP into a single utility, while collaborating on UPKI to bring certificate revocation to system utilities. To manage Rust packaging at distribution scale, Canonical vendors dependencies per package rather than creating individual Debian packages for crates and embeds software bills of materials into binaries using cargo auditable. Future plans include exploring Rust implementations of compression libraries like bzip2-rs, zlib-rs, and zstd-rs.
Passwordless authentication replaces passwords with one-time codes delivered by SMS, and this tutorial builds a Rust app around that flow. The app uses Twilio Verify for OTP generation and validation, with GET and POST routes at "/" for collecting a phone number and at "/verify" for entering the received code. It sets up a Cargo project with Axum, Handlebars templates, sessions, dotenvy configuration, and the rustlio Twilio client, while environment variables hold the Account SID, Auth Token, and Verify Service SID. The implementation also serves HTML forms and static assets, with verification status rendered as a success or error message. Running cargo run starts the server on port 8080, where users can submit a number, receive an SMS, and see whether the verification code is valid.
Command-line tools lack browser redirect capabilities, preventing standard OAuth login flows. To resolve this limitation, the OAuth 2.0 Device Authorization Flow issues a temporary device code, presents a verification URL to the user, and waits for authentication in an external browser. A Rust workspace demonstrates this end-to-end pattern across a CLI, an Axum web API, and a shared authentication library. The shared library relies on jsonwebtoken and reqwest to fetch JSON Web Key Sets and validate token signatures, issuers, and audiences against typed claims. Axum secures protected routes through custom FromRequestParts extractors that decode Bearer headers, enabling verified CLI access.
AI-assisted development enables employees to build applications rapidly, but unmanaged deployments can accidentally expose internal company data to the public Internet. Cloudflare introduced direct Cloudflare Access integration for Cloudflare Workers, allowing organizations to enforce authentication policies directly at the account or individual Worker level rather than per hostname. When enabled, incoming requests are authenticated before reaching application code across custom domains, routes, workers.dev subdomains, and preview environments. Developers can access authenticated identity data such as emails and groups directly via the Worker context object without manually validating JSON Web Tokens. This capability was implemented on Cloudflare's Rust-based FL2 proxy, which separated Worker routing from Worker execution so routing runs safely prior to Access policy enforcement.
GitHub's code search engine, Blackbird, must case-fold over 480TB of source code across 180 million repositories during indexing and query matching. To accelerate this operation on source code that is overwhelmingly ASCII, the engineering team replaced early-exit branching with an unconditional branch-free loop. The implementation tests uppercase ASCII ranges using wrapping arithmetic, modifies bits in place, and detects non-ASCII bytes with an accumulator register tested only after the loop completes. Eliminating data-dependent exits allowed LLVM to generate SIMD instructions and achieve throughput exceeding 45 GiB/s on an Apple M4 processor. The optimized implementation was released as the open-source Rust crate casefold.
Supabase Pipelines has moved into public alpha as a service for replicating Supabase Postgres data to external analytical systems in near real time. The release adds automatic application of supported schema changes, faster initial synchronization through parallelism, and a destination request form for ClickHouse, Snowflake, and DuckLake; Google BigQuery is the first destination available to everyone in public alpha. Powered by the open-source Rust-based Supabase ETL, Pipelines uses Postgres logical replication to copy existing tables, stream inserts, updates, deletes, and truncates, and resume from the last acknowledged position after interruptions. It provides at-least-once delivery and managed pipeline controls, while remaining an alpha product with ongoing work on throughput, batching, backpressure, broader schema support, and additional destinations.
Agent swarms are evaluated as a way to scale software work beyond what a single long-running agent can reliably manage. The test revisits building SQLite in Rust from its documentation, comparing old and new swarms with identical models and time budgets against a held-out SQL suite; the new system performed better in every configuration, reaching 80% with Grok 4.5 in four hours. Planners decompose task trees while workers execute narrower pieces, supported by a purpose-built version control system and mechanisms for design conflicts, merge collisions, megafiles, intentional breakage, and review. Reported results include a full-suite pass using 9,908 engine-code lines versus 64,305 for the old harness, while costs ranged from $1,339 for an Opus 4.8 hybrid to $10,565 for GPT-5.5 alone, indicating that cheaper models can perform most execution after frontier planning resolves ambiguity.
ClickHouse announces an official ADBC driver, a modern Arrow-native alternative to ODBC and JDBC for analytics and AI applications. It provides end-to-end columnar movement: query results leave ClickHouse as Apache Arrow and arrive in applications without a row-oriented conversion or staging step. A single Rust-built implementation connects through ClickHouse's HTTP interface, supports TLS, and serves languages and tools with ADBC bindings, including Ruby, R, and C. Users can install precompiled, signed binaries through the ADBC Driver Foundry and connect with a clickhouse:// URI; dbt Fusion distributes the driver directly. The driver also supports streaming Arrow inserts, while schema discovery, improved bulk ingest, usage examples, and JSON support remain on the roadmap.
amazon.science
Reinforcement learning for agentic tasks requires updating model parameters against the precise token sequences generated during rollouts. Standard agent harnesses frequently modify conversation transcripts through message compaction and tool formatting, causing retokenization drift that degrades policy-gradient training. Turnstile addresses this issue as a Rust-based proxy situated between agent harnesses and inference backends such as SGLang. By intercepting OpenAI-compatible Chat Completions traffic, the proxy records exact token IDs, log probabilities, loss masks, weight versions, and mixture-of-experts routing traces at the moment of generation. Validation across text-based coding and multimodal computer-use agents demonstrated steady reinforcement learning improvements without requiring modifications to agent harnesses.
Grab’s Counter Service supports time-windowed fraud queries at tens of thousands of QPS and about a billion requests per day, but an infrastructure review prompted migration from a wide-column database to Aerospike. The team first separated Rust business logic from storage, then added an enum-dispatched facade with Single, WithShadow, and WithSplit modes so traffic could be compared and shifted without downtime. They also redesigned the writer path around Aerospike, including a map-based schema and a single atomic increment, while testing index placement and reverting from an NVMe-backed primary index after hot-key p99 spikes. Production p99 read latency improved by roughly 50%, disk usage fell from about 3 TB to 1 TB, and per-node cost dropped 45–50%; the rollout reported zero downtime and no data-integrity issues.
ClickHouse Cloud built WAL-RUS, an open-source Rust implementation of PostgreSQL backup and WAL archival tooling, after encountering difficulty predicting WAL-G’s memory usage in resource-constrained environments. The project preserves WAL-G’s core functionality and compatibility while using bounded worker pools, controlled concurrency, persistent object-storage connections, and a streaming pipeline that limits buffering and data copies. It uses the same WALG_ configuration variables, and WAL-G and WAL-RUS can read each other’s archives. In a sustained WAL-heavy benchmark with four archival workers, WAL-RUS stayed below 1 GB of peak virtual memory versus nearly 2.8 GB for WAL-G, while both maintained minimal backlog and comparable CPU usage. The authors plan to make WAL-RUS the default backup and archival mechanism for ClickHouse Cloud’s managed Postgres offering and are working to upstream its Postgres 17 wal summaries support to WAL-G.
The post benchmarks Zerobus Ingest, a managed, serverless, push-based service that writes producer data directly to Delta tables governed by Unity Catalog, against a petabyte-scale telemetry workload. Using NASA’s NEOWISE dataset and Locust, the test modeled fan-in from 2,048 concurrent streams, using Protocol Buffer 2 data over approximately 24 hours. The design replaces static partition-based ordering with stream-connection ordering, allowing heuristic routing across pods, dynamic partitioning, and autoscaling while existing streams drain. It also uses zeroparser, a zero-copy protobuf decoder whose design relies on Rust’s lifetime system and supports dynamic descriptors at about 1 GB/s per CPU core. The test sustained 12 GB/s to one table, ingested 1.04 trillion rows, and reached 1 petabyte within 24 hours; Zerobus Ingest is generally available, with additional APIs on its roadmap.
amazon.science
AWS has introduced M9g and M9gd EC2 instances powered by Graviton5 CPUs, featuring the formally verified Nitro Isolation Engine to enforce virtual machine isolation. To prove the engine's correctness, engineers developed 330,000 lines of machine-checked mathematics using the Isabelle/HOL proof assistant. The system architecture separates hypervisor policy from isolation mechanisms, requiring the deprivileged Nitro Hypervisor to route all guest state modifications through the minimal Rust-based engine. Functional verification uses a restricted language subset called micro Rust, Separation Logic contracts specifying total correctness, and weakest-precondition calculus from the open-source AutoCorrode library. Finally, high-level transition relations and noninterference proofs ensure that memory integrity and guest confidentiality are preserved across every execution step.
ClickHouse initially built native protocol support to read Delta Lake tables, but maintaining pace with the format's evolving specification created high complexity and fragmented features. To resolve this, engineers integrated the Rust Delta Kernel to offload protocol handling while retaining ClickHouse's optimized Parquet data reading. The Delta Kernel parses JSON transaction logs, resolves snapshots, manages transactional write metadata, and exposes schema evolution mapping alongside Change Data Feed streams. ClickHouse also contributed upstream enhancements to the Rust kernel, adding dynamic runtime logging and asynchronous metadata processing via FFI handles. While ClickHouse can attach to existing Delta tables, the integration cannot yet initialize empty Delta Lake tables.
The best engineering reads, once a week.