# \[Show\] swift-topomap: Silicon-aware TUI and eBPF metrics engine

**URL:** <https://users.rust-lang.org/t/show-swift-topomap-silicon-aware-tui-and-ebpf-metrics-engine/141492>\
**Category:** announcements\
**Created:** [July 27, 2026, 5:16am UTC](https://users.rust-lang.org/t/show-swift-topomap-silicon-aware-tui-and-ebpf-metrics-engine/141492 "2026-07-27T05:16:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AnkurRathore](https://sea1.discourse-cdn.com/flex019/user_avatar/users.rust-lang.org/ankurrathore/32/51979_2.png) [@AnkurRathore](https://users.rust-lang.org/u/AnkurRathore)\
**Post date:** [July 27, 2026, 5:16am UTC](https://users.rust-lang.org/t/show-swift-topomap-silicon-aware-tui-and-ebpf-metrics-engine/141492/1 "2026-07-27T05:16:45Z")

</div>

Hello Everyone

I have been working on a project called **swift-topomap** for the last few weeks. It’s a TUI tool designed to solve a problem I keep running into: standard tools like htop show CPU usage, but they don't tell you if that usage is actually _productive_.

I wanted a way to see the physical hardware topology (Sockets, L3 Cache boundaries) and overlay live microarchitectural metrics (IPC, Cache Misses) using eBPF, but without the baggage of heavy C-library dependencies.

#### **Technical Highlights:**

- **Native Topology Resolver:** Instead of linking against libhwloc, I wrote a pure Rust parser for /sys/devices/system/cpu and /sys/devices/system/node. It maps physical package IDs to logical cores and identifies shared L3 cache boundaries natively.
- **Hybrid Telemetry Engine:** It uses a trait-bound collector that negotiates privileges at startup. If run as root, it loads a CO-RE eBPF driver via libbpf-rs to hook sched\_switch and read hardware PMCs (Performance Monitoring Counters).
- **Microarchitectural Insights:** The TUI classifies core states. For example, a core at 100% usage but \< 0.5 IPC will turn Amber (Memory-Bound/Stalled), while a high IPC core stays Emerald Green.
- **Static GNU Build:** Linking this was a nightmare. I eventually solved the static requirements to bundle libbpf, libelf, and zstd so it ships as a single 3.5MB binary that runs on any modern Linux distro without shared library hell.

#### **Why eBPF + Rust?**

I chose Rust for the logic layer and TUI (Ratatui) because I needed memory safety for the FFI boundary with libbpf. The IPC and LLC metrics are pulled via the kernel’s Perf Subsystem, and the deltas are calculated in Rust to provide a steady 100ms-refresh dashboard.

I’m releasing this as open source under SwiftLogic Systems. I would love to hear your thoughts on the topology resolution logic or the eBPF/Perf integration.  
**GitHub:** [GitHub - swiftlogicsystems/swifttopology: A high-performance, hardware-aware system observability tool. Maps CPU topology (NUMA, Caches, Cores) with real-time performance metrics (IPC, Cache Misses) using Deep-System eBPF (CO-RE) and a Rust-based Ratatui TUI · GitHub](https://github.com/swiftlogicsystems/swifttopology)

Some Screen Shots of the tool

 ![intel_xeon_mixed_workload](https://us1.discourse-cdn.com/flex019/uploads/rust_lang/original/3X/2/1/21120eacb5e2ae953d40c4c4ab4a7a9f36376364.png)

 ![intel_xeon_compute_bound](https://us1.discourse-cdn.com/flex019/uploads/rust_lang/original/3X/d/0/d0f752a71927553ffcb78ac8de7de5036025130f.png)

---

<div class="post-metadata">

**Author:** ![system](https://sea1.discourse-cdn.com/flex019/user_avatar/users.rust-lang.org/system/32/51372_2.png) [@system](https://users.rust-lang.org/u/system)\
**Post date:** [October 25, 2026, 5:17am UTC](https://users.rust-lang.org/t/show-swift-topomap-silicon-aware-tui-and-ebpf-metrics-engine/141492/2 "2026-10-25T05:17:32Z")

</div>

Closed on October 25, 2026, 5:17am UTC

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.
