<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Yash Kumar Saini on Medium]]></title>
        <description><![CDATA[Stories by Yash Kumar Saini on Medium]]></description>
        <link>https://medium.com/@yash_k_saini?source=rss-01744697467e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*BB6e9KfS_eulEz-dY8iNJQ.jpeg</url>
            <title>Stories by Yash Kumar Saini on Medium</title>
            <link>https://medium.com/@yash_k_saini?source=rss-01744697467e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 14:16:44 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@yash_k_saini/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Devcon 8 Mumbai: Four Days at Ethereum’s Biggest Builder Gathering]]></title>
            <link>https://medium.com/@yash_k_saini/devcon-8-mumbai-four-days-at-ethereums-biggest-builder-gathering-85948842e929?source=rss-01744697467e------2</link>
            <guid isPermaLink="false">https://medium.com/p/85948842e929</guid>
            <category><![CDATA[ethereum-blockchain]]></category>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[open-source]]></category>
            <dc:creator><![CDATA[Yash Kumar Saini]]></dc:creator>
            <pubDate>Sat, 14 Nov 2026 08:17:34 GMT</pubDate>
            <atom:updated>2026-11-14T08:17:34.016Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i3UUXAgmylBWlPBzFn41lg.jpeg" /><figcaption>Me at Devcon 8 Mumbai</figcaption></figure><p><em>What the first Devcon in India covered, what happened at the libp2p hub, and how my GossipSub simulator held up in front of the people who build the real thing.</em></p><p>I spent 3–6 November at Devcon 8 in Mumbai as part of the libp2p crew at the Resilient Networking Hub, and I showed Luminar, my GossipSub simulator, to people who work on the real thing.</p><p>This was the first Devcon held in India. I came down from a village in Uttarakhand, so for once the biggest Ethereum gathering of the year was a domestic trip for me, not a visa application.</p><p>This post covers what the conference was, the talks that set the agenda, what happened at our hub, how the Luminar demo went, and what I am taking home.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*1JN-_A90X6n5j2p7st3boA.jpeg" /><figcaption>Friends I made along the way</figcaption></figure><h3>Devcon 8 at a glance</h3><p>Devcon is the Ethereum Foundation’s conference for the people who build the protocol and everything around it. The 2026 edition ran four days in one venue, the Jio World Centre in Bandra Kurla Complex.</p><ul><li><strong>Dates:</strong> 3–6 November 2026</li><li><strong>Venue:</strong> Jio World Centre, BKC, Mumbai</li><li><strong>Programme:</strong> 928 sessions across main stages and Community Hubs</li><li><strong>Busiest days:</strong> Day 2 and Day 3, 283 sessions each</li><li><strong>Tracks:</strong> 9: Core Protocol, Security, Privacy &amp; Consent, Applied Cryptography, Permissionless Networks, Open &amp; Verifiable Stack, Users/Builders/Agents, Rights/Freedoms/Governance, Futures Worth Building</li><li><strong>Community Hubs:</strong> 18 community-run spaces, each with its own schedule</li></ul><p>The hubs are what made it feel different from a normal conference. Each one was a room run by a community: P2P Networking, Resilient Networking, Security, Privacy, EIP, Agentic, India, Open Source, DeSci, Open Hardware and more. You could spend a whole day in one hub and never see a main sta</p><h3>Four days, as they happened</h3><p>I posted from the floor all week. The posts are embedded below in the order I wrote them.</p><h3>Day 1, Tuesday 3 November: opening and the first Network Lab</h3><p>The opening ceremony filled the Main Stage from 10:10, then five keynotes ran back to back until noon. Our hub had been open since 09:00 with “Resilient Networks from Zero”, an intro to peer identity, discovery, transports and secure connections.</p><p>I was on two sessions that day, both at the Resilient Networking Hub:</p><ul><li><strong>11:30, Maintainer Meet-up and Network Lab 101.</strong> An open Q&amp;A where maintainers introduced their projects. I shared the slot with Daniel Thompson, Shouki Tsuda, Sumanjeet and Soham Bhoir.</li><li><strong>17:00, Maintainer Meet-up and Network Lab.</strong> The hands-on follow-up: open research questions and experiments run together with whoever walked in.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PObU79UHV2Od4Y9AGHNRXA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*S3nktW1ruizg-hRegjp_hg.jpeg" /></figure><p>Day 2, Wednesday 4 November: ETHIndia day</p><p>Day 2 was the heaviest day on the schedule. ETHIndia ran as a one-day conference inside Devcon on the Community Led Stage, opening with Vitalik Buterin in conversation with Siddharth Shetty. Core Protocol talks took over Lotus Stage 2, and our hub ran workshops on post-quantum P2P migration and verifiable agent receipts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zwh7Li5z8reYqnvqKbtG4g.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NDB0q4TBqPtfhpJSczSSFA.jpeg" /></figure><h3>Day 3, Thursday 5 November</h3><p>The official Day 3 recap led with post-quantum Ethereum, formal verification, and a Tor AMA with Roger Dingledine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*F3bvO2rIycqQ7FQ-led9Dw.jpeg" /><figcaption>Bidding Goodbye to Steven mih, he had a flight that evening</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3HUGnWNJbXNxk-o8FbJAHg.jpeg" /><figcaption>Met with Akash we’ve beenf riendson dsicord for a long time now</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*RaemRteN4-7-cQblhKDykg.jpeg" /><figcaption>Me with a Young Japenese High shcool researcher</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/961/1*lcVdhSRhu6k03uWRpmLzfQ.jpeg" /><figcaption>Me with Co-Exhibitor of RNH hub at Devcon 8</figcaption></figure><p>Day 4, Friday 6 November: closing</p><p>The last day was the lightest, 169 sessions, and most of it was goodbyes and “send me the repo” conversations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8XP5tsW47aw3yPRFa09rUg.jpeg" /><figcaption>Finally able to free time and present Luminar, that web of nodes is the network runnin in a attack simulation</figcaption></figure><h3>The talks that set the agenda</h3><p>Five themes ran through the programme: post-quantum migration, privacy by default, a faster L1, agents that pay, and security in the age of AI. Almost every session I can name fits one of them.</p><h3>The opening keynotes</h3><p>Day 1’s Main Stage block set the tone for the week:</p><ul><li><strong>The Open Secure and Verifiable Half to a Brighter Future:</strong> Vitalik Buterin</li><li><strong>Sanctuary, Together:</strong> Audrey Tang</li><li><strong>Post-Quantum Transition:</strong> Justin Drake, Kev</li><li><strong>Reducing the Trust Surface:</strong> Derek Sorensen, Mooly Sagiv</li><li><strong>End-to-End Privacy:</strong> Nico, Luca Donno</li></ul><p>Vitalik’s keynote made the case for building technology that is open, secure and verifiable. Later that afternoon he and Audrey Tang took audience questions on civic AI and whether agents can be safe in the open.</p><h3>Post-quantum is now a roadmap item</h3><p>Justin Drake and Kev laid out Ethereum’s post-quantum transition from the Main Stage, and Drake followed with a full PQ Q&amp;A on Day 2. The topic reached every layer:</p><ul><li>“Getting to Lean Ethereum” framed the path as two roadmaps that must converge, not one hard fork.</li><li>The P2P Networking Hub ran “PQ, zk and PQDS: what’s the impact on P2P”.</li><li>Our hub ran a workshop on migrating Ethereum’s P2P layer to post-quantum cryptography.</li></ul><p>For anyone working on libp2p, this is the part to watch. Bigger signatures and new handshakes land on the networking layer first.</p><h3>A faster, bigger L1</h3><p>Core Protocol talks were about speed and scale:</p><ul><li><strong>Glamsterdam.</strong> The EIP Hub covered the gas limit going from 60M to 200M and the repricing work behind it.</li><li><strong>Fast finality.</strong> “From 16 Minutes to Seconds” and the Fast Finality update showed decoupled consensus moving from idea to spec.</li><li><strong>Fast confirmation.</strong> The Fast Confirmation Rule targets 13-second confirmations for flows that do not need full finality.</li><li><strong>FOCIL.</strong> Inclusion lists for censorship resistance had lightning talks, an EPF implementation in Lighthouse, and a roundtable at the P2P Networking Hub.</li></ul><h3>Privacy by default</h3><p>Privacy &amp; Consent had its own track and a full afternoon on Lotus Stage 1. “Kohaku: privacy for everyone, by default” showed light clients and privacy protocols built into the wallet. “Paths to a Private L1” and “Encrypt the Mempool” pushed the same idea down into the protocol.</p><h3>Agents that pay</h3><p>The Agentic Hub ran a packed schedule all four days. x402, ERC-8004 and ERC-8183 came up in almost every slot, and the honest takes were the best ones: registration works, reputation is the hard part, and real usage is smaller than the headlines.</p><h3>Security in the age of AI</h3><p>A panel with Vitalik, Mooly Sagiv and others asked how to secure Ethereum when attackers and auditors both have agents. Workshops went hands-on: a prompt-injection lab for AI pipelines, and a Solidity CTF you could enter as a human, a human plus AI, or a fully autonomous agent.</p><h3>The India angle</h3><p>ETHIndia’s day inside Devcon covered policy, institutions and tokenisation in India. Sandeep Nailwal spoke on open financial rails for the country, and GM Vidit Gujrathi played blindfold chess against two players at once on the ETHIndia stage.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qrKGS5Z__qsZsFB1m5dOww.jpeg" /><figcaption>Me with Shouki discussing about new p2p implementations and post quantum stuff</figcaption></figure><h3>Home base: the Resilient Networking Hub</h3><p>I spent most of my time at the Resilient Networking Hub, the libp2p-led room that Manu Sheel Gupta put together. I was one of the maintainers on its schedule, and it is the reason I was in Mumbai at all.</p><p>The hub asked one question for four days: what makes a network resilient? The sessions answered it from very different angles.</p><ul><li><strong>Resilient Networks from Zero</strong> (Manu Sheel Gupta and the hub team): Peer identity, discovery, transports, secure connections</li><li><strong>What Makes a Network Resilient?</strong> (Miglė Rakitaitė, Manu Sheel Gupta, Steven Mih and others): Research roundtable on connectivity, trust, failure and recovery</li><li><strong>Formal Verification for Decentralized Systems</strong> (Banri Yanahama, Ryosuke Kaga): Reasoning about protocol correctness</li><li><strong>Ethereum’s Post-Quantum P2P Migration</strong> (Shouki Tsuda, Ryosuke Kaga): Protocol challenges and implementation paths</li><li><strong>Verifiable Agent Actions and Trustworthy Receipts</strong> (Steven Mih, Banri Yanahama): Independently verifiable evidence for what agents do</li><li><strong>Distributed Quantum Services over P2P Networks</strong> (Soham Bhoir): Coordinating computation with py-libp2p</li><li><strong>Libp2p and IPFS in Histopathology Labs</strong> (Vishesh Mathur): Sharing medical imaging over libp2p and IPFS</li><li><strong>Self-Hosted IPFS Infrastructure</strong> (Anurag Pandey, Manu Sheel Gupta): Running and maintaining your own IPFS setup</li></ul><p>The hub also took its case to the bigger rooms. Manu and Shouki Tsuda ran “Building Resilient Ethereum” as a workshop on Day 1, and Manu spoke at the Security Hub on security coordination between libp2p and Ethereum infrastructure.</p><p>Alongside it, the P2P Networking Hub covered Ethereum’s own networking stack: a guided tour by Yiannis Psaras of ProbeLab, Csaba Kiraly of the EF on the mempool and on big blocks with fast diffusion, and Waggle, a hands-on message broadcasting workshop from Sigma Prime. Between the two rooms, networking had a full four-day programme of its own.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AjDszU4uRpMaR4Ds7tqz6A.jpeg" /><figcaption>Discussing attacks on a Gossipsub network, juding how close the simulation comes to the real thing</figcaption></figure><h3>Showing Luminar</h3><p>Luminar is a real-time simulator of a GossipSub v1.1 network: simulated libp2p peers, P1–P4 peer scoring, and attacks you inject while it runs. I built it because gossip attacks are invisible until the mesh breaks, and I wanted the mechanism on screen.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*2hlEYeVJ73s8IWfb.png" /></figure><p>What I showed</p><p>The demo runs from two recordings: a Sybil and eclipse run, then a partition that heals.</p><ol><li><strong>A publish.</strong> Fifty peers gossip, and a message lights the mesh hop by hop. It crosses the network in 4.2 hops on average.</li><li><strong>A Sybil attack.</strong> Five attacker peers graft into honest meshes at T+10.2 s and flood invalid messages. Each invalid message costs ten points of P4. They fall past the prune threshold and are gone by T+11.9 s, two heartbeats later. Delivery holds at 100%.</li><li><strong>An eclipse.</strong> Silent attackers take every mesh slot around one peer. They send nothing invalid, so P4 never fires. Scoring cannot see it, and the peer is only freed when the fault is cleared.</li><li><strong>A partition.</strong> The network is cut in half for 20 seconds. Delivery drops to 50%, then the mesh grafts itself back together in 4.5 s.</li></ol><p>The eclipse is the part I care about most. It is easy to assume peer scoring catches everything, and watching the score stay flat while a peer is isolated makes the limit obvious.</p><h3>Honest by design</h3><p>Luminar runs the same mechanism as mainnet with toy constants, and I say so on the page. Mesh degree is 6 with a one-second heartbeat. Ethereum mainnet runs D 8, a 0.7 s heartbeat, and score thresholds in the thousands. Luminar scores on P1–P4, while a real node adds P5–P7.</p><p>There is also a mainnet mode: a map that lights ethPandaOps observer nodes in the order a real block reached them.</p><h3>How it is built</h3><ul><li><strong>Backend:</strong> Python 3.12, FastAPI, Trio, py-libp2p, NetworkX</li><li><strong>Frontend:</strong> TypeScript, deck.gl (WebGL), d3-force, Vite</li><li><strong>Transport:</strong> One WebSocket, multiplexed at 20 Hz</li><li><strong>Replay:</strong> Recordings play in the browser with no backend</li></ul><p>Record and scrub every run, so a talk doesn&#39;t depend on conference Wi-Fi. There is a stage mode with a projector theme for exactly this reason.</p><h3>People</h3><p>The hallway is the reason to go to a conference in person. Mine was mostly inside one hub, which meant I kept meeting the same people in different sessions until we were no longer strangers.</p><ul><li><strong>Manu Sheel Gupta</strong>, who leads the libp2p work I contribute to and who brought me into the hub.</li><li><strong>The maintainers I shared the Network Lab with</strong>: Daniel Thompson, Shouki Tsuda, Sumanjeet and Soham Bhoir.</li><li><strong>Steven Mih</strong> of Action State, whose sessions on verifiable agent actions and evidence for AI inference from strangers gave me a new problem to think about.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lUhhX0MNnt9BtvcwxphdNA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-VnGEwG0MOfMRDNaGfn1_g.jpeg" /><figcaption>Discussed with Banri founder of Nyx foundation was interested what they are doing.</figcaption></figure><h3>What I am taking home</h3><ul><li><strong>Networking is no longer the quiet layer.</strong> Post-quantum signatures, bigger blocks, shorter slots and inclusion lists all put pressure on P2P first. Two full hubs on networking says the ecosystem knows it.</li><li><strong>Show the mechanism.</strong> A demo people can watch beats a slide that tells them. Luminar exists because I could not see what GossipSub scoring was doing, and that turned out to be a common problem.</li><li><strong>Be honest about the toy.</strong> Saying “same mechanism, toy constants” up front made the conversations better, because nobody had to guess what the simulator could and could not prove.</li><li><strong>Agents need evidence, not just payments.</strong> The agent-payment rails are shipping. The harder question, raised at both our hub and the Agentic Hub, is how a third party verifies what an agent actually did.</li><li><strong>India showed up.</strong> ETHIndia, the India Hub, EPF fellows presenting client work, and a crowd of first-time attendees. Devcon coming here lowered the barrier for a lot of builders, me included.</li></ul><h3>What is next</h3><ul><li>Keep hardening the Kademlia DHT in py-libp2p.</li><li>Take the feedback from Mumbai back into Luminar.</li><li>Follow up on the conversations that started at the hub.</li></ul><p>Thank you, Mumbai.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=85948842e929" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From a crash to crates.io: shipping a Rust CLI tool]]></title>
            <link>https://medium.com/@yash_k_saini/from-a-crash-to-crates-io-shipping-a-rust-cli-tool-f6ed59c16a9f?source=rss-01744697467e------2</link>
            <guid isPermaLink="false">https://medium.com/p/f6ed59c16a9f</guid>
            <category><![CDATA[tools]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[rust]]></category>
            <category><![CDATA[cli]]></category>
            <dc:creator><![CDATA[Yash Kumar Saini]]></dc:creator>
            <pubDate>Wed, 28 Oct 2026 14:41:39 GMT</pubDate>
            <atom:updated>2026-10-28T14:46:15.677Z</atom:updated>
            <content:encoded><![CDATA[<h4>What it took to turn a simple word counter program into a tested, benchmarked, released tool, and why it ended up using 20x less memory than `sort | uniq`</h4><p>I wanted a small tool that answers one simple question: <em>which words show up most in the document? </em>I write notes in Markdown, read books in PDF, and get specs as Word files, so I had to read all of them.</p><p>The first version took an evening, but shipping it took a lot longer. This is the story of that second part: the decisions, the mistakes, and the checklist I now use for every project.</p><p>It&#39;s called <strong><em>wfreq</em></strong>, and you can install it using the command <strong><em>cargo install wfreq</em></strong><em>.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/979/1*YuHfP7RN5EuT8rxwGigGng.gif" /><figcaption>wfreq running in the terminal</figcaption></figure><h3><strong>Day one: it worked, until it didn’t</strong></h3><p>My first `main.rs` was about twenty lines. It read a file with</p><pre>std::fs::read_to_string</pre><p>split on whitespace, counted words in a <em>HashMap</em>, and printed the top ten.</p><p>Then I pointed it at a PDF, and it crashed: File can not read: Error { kind: InvalidData, message: “stream did not contain valid UTF-8” }</p><p>A PDF is not text. It is a binary format with compressed streams, and <em>read_to_string </em>refuses anything that is not valid UTF-8. That one crash set the direction for the whole project: <strong>reading files is the hard part, counting is the easy part. </strong>So I designed the tool around that.</p><h3><strong>The shape: messy edges, pure middle</strong></h3><p>I split the program into stages, and each stage hands a simpler thing to the next:</p><blockquote>paths -&gt; files -&gt; text -&gt; word counts -&gt; top N -&gt; output</blockquote><p>Each arrow is a module:</p><ul><li><strong>input.rs</strong> turns your input — files, folders, <em>-r</em>, or <strong><em>-</em></strong> for stdin— into a list of files.</li><li><strong>parser/</strong> converts each file into plain text, choosing a parser by extension: plain <em>std::fs</em> for <strong>.txt</strong> and <strong>.md</strong>, the <em>pdf-extract </em>crate for PDFs, and <em>docx-lite </em>for Word files.</li><li><strong>core.rs</strong> counts, merges, filters, and ranks.</li><li><strong>output.rs</strong> prints a plain list, a bar chart table, or CSV.</li><li><strong>main.rs</strong> simply connects the pieces.</li></ul><p>The rule that made everything easier: <strong>all the code that can fail lives at the edges.</strong> The input and parser handle missing files, broken PDFs, and invalid UTF-8. By the time text reaches <em>core.rs</em>, nothing can go wrong, so its functions take a <em>&amp;str</em> and return plain values, not <em>Result</em>. That also made core trivial to test: no files, no setup, just strings in and maps out.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ggjrg-cmgb55U2HRfDarjg.png" /><figcaption>Architecture.png</figcaption></figure><h3><strong>Count once, borrow everywhere</strong></h3><p>My first counting function did everything: it counted, sorted, and cut the list down to the top N. When I wanted statistics (total words, unique words, a “lexical diversity” ratio), the obvious move was to call it again and filter the result.</p><p>That would have been wrong, not just slow. The function had already thrown away every word below the top ten.</p><p>So I split it in two. <em>count_words </em>reads the text once and returns a <em>HashMap&lt;String, usize&gt;</em>. Every other function <strong><em>borrows </em></strong>that map: <em>top_n</em>, <em>stats</em>, the length filter, the stop-word filter. The text is scanned once, and each extra statistic costs one pass over the unique words, far fewer than the total.</p><p>When I later added support for whole folders, this paid off again. Each file is counted on its own and merged into one map with a five-line <em>merge_counts</em>. None of the filters had to change.</p><h3><strong>Small details that were actually bugs</strong></h3><p>A few things I got wrong that are worth sharing:</p><p>Bytes are not letters. <em>— max-len 4 </em>should keep <em>café</em>. It didn’t, because <em>String::len() </em>counts bytes, and <em>é </em>is two bytes in UTF-8. The fix is <em>word.chars().count()</em>.</p><p>Off by one on the defaults. My first length filter used <strong>&gt;</strong> instead of <strong>&gt;=</strong>. With the default minimum of 1, it silently removed every one-letter word, like <em>a</em> and <em>I</em>, on every run, even when the user had asked for no filtering at all.</p><p>A hash map has no order. Iterating a <em>HashMap </em>gives a different order on every run, so two words with the same count would swap places between runs. Sorting by count and then alphabetically keeps the output stable, which matters as soon as you write a test that compares it.</p><p>Results and messages need different streams. Results go to stdout. Warnings, errors, and the <em>-v </em>statistics go to stderr. That means <em>wfreq notes.md -f csv &gt; top.csv </em>gives you a clean CSV file, even when something goes wrong.</p><p>The error handling itself turned into its own saga (my tool once told me a file “<strong>was not found</strong>” while I was looking right at it). I wrote that up separately on DEV.</p><h3><strong>How fast is it, really?</strong></h3><p>I wanted a fair comparison against something people already use. The classic shell answer to <strong><em>count the words in a file </em></strong>is:</p><blockquote>tr -cs “[:alnum:]’” ‘\n’ &lt; corpus.txt | tr A-Z a-z | sort | uniq -c | sort -rn | head</blockquote><p>I ran both on 17 MB of real English text (a programming handbook, 3.5 million words) with <a href="https://github.com/sharkdp/hyperfine">hyperfine</a>:</p><ul><li>wfreq: 187 ms, 21 MiB peak memory</li><li>tr | sort | uniq -c | sort -rn: 258 ms, 412 MiB peak memory</li></ul><p>wfreq is about 1.4x faster and uses about 20x less memory. The speed gap is modest; the memory gap is the real story. The pipeline has to <em>sort every word </em>in the file, all 3.5 million of them, so it keeps them all around. A hash map only keeps one entry per <em>distinct </em>word, a few thousand here. The algorithm matters more than the language.</p><p>For the counting core alone, the <a href="https://crates.io/crates/criterion">criterion</a> benchmarks show about 148 MiB/s on a million words. The numbers are from my laptop (Intel i7–13620H, Linux), and the script is in the repo, so anyone can rerun them.</p><h3><strong>The shipping checklist</strong></h3><p><em>It works on my machine</em> is where most side projects stop. I gave myself a checklist to get past that, and I’d recommend it to anyone shipping a Rust tool:</p><p>1. CI that blocks bad code. Every push runs <strong><em>cargo fmt — check</em></strong>, <strong><em>cargo clippy</em></strong> with warnings treated as errors, the tests, <strong><em>cargo doc </em></strong>with warnings denied, and a build on the oldest Rust version I claim to support (1.88).</p><p>2. Tests of three kinds.</p><ul><li><strong><em>Unit tests </em></strong>next to the code, for the counting and filtering rules.</li><li><strong><em>Integration tests </em></strong>that run the real binary and check stdout, stderr, and the exit code. These catch the bugs that only exist in the wiring. One version of my parser compiled fine but made every text file “contain” just the words “parser” and “success”; a single end-to-end test makes that impossible to miss.</li><li><strong><em>Integration tests </em></strong>with <a href="https://crates.io/crates/proptest">proptest</a>. Instead of hand-picking inputs, you state a rule, like “<em>top_n</em> is always sorted” or “the length filter keeps exactly the words in range”, and proptest throws random input at it.</li></ul><blockquote>48 tests in total, and they run in about four seconds.</blockquote><p>3. Docs on every public item. <em>#![warn(missing_docs)] </em>turns a missing doc comment into a warning, and CI turns warnings into failures. There is also a runnable example under <em>examples/</em>.</p><p>4. No unsafe code, enforced. <em>#![forbid(unsafe_code)] </em>makes any <em>unsafe </em>block a compile error. That is also why I don’t need Miri, Rust’s checker for undefined behaviour: it only finds problems in unsafe code.</p><p>5. A real release. A changelog, a version tag, binaries for Linux, macOS and Windows built by a GitHub Actions workflow, and a crate on crates.io. The workflow pins every third-party action to a full commit hash instead of a tag like @v1, so nobody can swap the code that runs with write access to my repository. Dependabot keeps those hashes up to date.</p><h3><strong>The name, and my first breaking change</strong></h3><p>The original name was <strong><em>wordfreq</em></strong>. It was already taken on crates.io, so the package became wfreq, while the command stayed <strong><em>wordfreq</em></strong>. I published 0.1.0 like that.</p><p>It felt wrong immediately. You’d install one name and type another. So I renamed everything to <strong><em>wfreq</em></strong>: the command, the library, the docs, and the diagrams.</p><p>That rename is a <em>breaking change</em>. Anyone using the library has to change <em>use wordfreq::… </em>to<em> use wfreq::…</em>, and any script calling <strong><em>wordfreq </em></strong>stops working. In Rust’s versioning rules, for a `0.x` crate the middle number is the “major” version, so this had to be 0.2.0, not 0.1.1. If I had shipped it as a patch, c<strong><em>argo update</em></strong><em> </em>would have quietly broken everyone who depended on it.</p><blockquote>Lesson: check the name on crates.io <strong><em>before </em></strong>you write the README.</blockquote><h3><strong>What I’d tell myself at the start</strong></h3><ul><li>Design around the part that can fail. For a file tool, that’s reading files, not processing them.</li><li>Count once, then borrow. Most “extra features” are just another pass over data you already have.</li><li>Strings are UTF-8: <em>len() </em>is bytes, <em>chars().count() </em>is characters.</li><li>Test the binary, not just the functions. Some bugs only exist in the wiring.</li><li>Benchmark against a tool people already know, and say what hardware you used.</li><li>A project isn’t done until someone else can install it with one command.</li></ul><p>wfreq is open source under the MIT license.</p><ul><li>Install: <em>cargo install wfreq</em></li><li>Code: <a href="https://github.com/yashksaini-coder/wordfreq">github.com/yashksaini-coder/wordfreq</a></li><li>Binaries: <a href="https://github.com/yashksaini-coder/wordfreq/releases">GitHub releases</a></li></ul><p>If you try it on your own notes, I’d love to hear what your most-used word turns out to be.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f6ed59c16a9f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building Rustlens: A TUI for Rust Code Inspect]]></title>
            <link>https://medium.com/@yash_k_saini/building-oracle-a-tui-for-rust-code-inspect-5f4d1e77acce?source=rss-01744697467e------2</link>
            <guid isPermaLink="false">https://medium.com/p/5f4d1e77acce</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[rust-programming-language]]></category>
            <category><![CDATA[rustlang]]></category>
            <category><![CDATA[rust]]></category>
            <category><![CDATA[terminal]]></category>
            <dc:creator><![CDATA[Yash Kumar Saini]]></dc:creator>
            <pubDate>Thu, 19 Feb 2026 11:02:43 GMT</pubDate>
            <atom:updated>2026-04-16T05:28:19.173Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZCLCTOu_lXCTbhpn7hUEjQ.gif" /><figcaption>Oracle TUI Demo GIF</figcaption></figure><h3>The Problem Everyone Has But Nobody Talks About</h3><p>Let me paint you a picture. It’s 2 AM. You’re SSH’d into a server debugging a Rust project. The connection has that beautiful 200ms lag that makes VSCode feel like you’re typing through molasses. You need to understand how tokio::spawn works in this specific codebase.</p><p>Your options are… not great:</p><p>Open VSCode and wait 3 seconds for every keystroke</p><p>Use grep and scroll through 400 lines of noise</p><p>Spend 15 minutes crafting the perfect rg regex, then realize you excluded the one file you needed</p><p>Just read the docs and guess how it’s being used</p><p>I got so frustrated with this that I did something stupid: I built my own tool.</p><p>That tool is Oracle — a terminal-based code inspector for Rust that actually feels good to use.</p><h3>What is Oracle?</h3><p>Oracle is basically what happens when you get annoyed enough to build your own code inspector. It’s a terminal UI for Rust projects that:</p><p>Uses Rust’s actual parser (syn) to deeply understand your code</p><p>Has fuzzy search that actually works well</p><p>Visualizes your dependencies from Cargo.toml</p><p>Integrates with crates.io for live documentation</p><p>Has four genuinely nice-looking themes</p><p>Includes smooth animations (because I have no chill)</p><p>All of this runs in your terminal. No GUI, no Electron eating 500MB of RAM, no browser tabs. Just fast, local code analysis.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8lmfSLwi29yQ5Kr629vBUw.png" /></figure><h3>How It Actually Works (The Technical Bits)</h3><h3>1. Parsing with syn</h3><p>So here’s the cool part: Oracle uses syn, which is literally the same parser that Rust’s compiler uses for procedural macros. This means it understands Rust code at a deep level — not just pattern matching on text like grep.</p><p>When you feed it a struct like this:</p><pre>#[derive(Debug, Clone)]<br>pub struct Config {<br>    pub host: String,<br>    pub(crate) port: u16,<br>    timeout: Duration,<br>}</pre><p>Oracle extracts:</p><p>Every field with its type</p><p>Visibility modifiers (public, crate-local, private)</p><p>The derives being used</p><p>Documentation if present</p><p>Exact source location</p><p>It’s not searching. It’s understanding.</p><h3>2. Building the UI with Ratatui</h3><p>The terminal UI uses Ratatui, which is this awesome framework for building TUIs. It’s what powers tools like bottom and gitui.</p><p>The layout is basically three panels:</p><p>Items List (20%) — where you browse functions, types, modules</p><p>Inspector Panel (80%) — where you see full details with syntax highlighting</p><p>Header — showing the Oracle logo and current context</p><p>You cycle between panels with Tab. Use j/k to navigate (Vim-style because I’m that person). Type / to search.</p><p>It just feels natural if you live in the terminal.</p><h3>3. Fuzzy Search That Doesn’t Suck</h3><p>The search uses fuzzy-matcher with the SkimMatcherV2 algorithm. Basically, you type “deser” and it finds:</p><p>Deserialize</p><p>Deserializer</p><p>deserialize_struct</p><p>custom_deserialize</p><p>All ranked by relevance. It’s the same fuzzy matching VSCode uses for Ctrl+P.</p><p>The code is simple:</p><pre>let matcher = SkimMatcherV2::default();</pre><pre>let scored: Vec&lt;_&gt; = items<br>    .iter()<br>    .filter_map(|item| {<br>        matcher.fuzzy_match(&amp;item.name, query)<br>            .map(|score| (item, score))<br>    })<br>    .collect();</pre><pre>scored.sort_by(|a, b| b.1.cmp(&amp;a.1));</pre><p>Simple, effective, fast.</p><h3>4. Dependency Integration</h3><p>Oracle reads your Cargo.toml using the cargo_metadata crate (the same tool cargo uses internally). Then it:</p><p>Builds your full dependency tree</p><p>Scans ~/.cargo/registry for installed versions</p><p>Fetches live info from crates.io’s API</p><p>Shows GitHub repo stats (stars, forks, last update)</p><p>Press o to open docs.rs in your browser. Press c for crates.io. It’s just convenient.</p><h3>5. The Animation Thing</h3><p>Okay so this is where I got a bit extra. I added animations to a CLI tool. Smooth scrolling with momentum, fade-in effects for selections, easing functions for tab transitions.</p><p>Here’s the scroll implementation:</p><pre>pub struct AnimationState {<br>    selection_highlight: f64,  // 0.0 → 1.0<br>    scroll_position: f64,<br>    transition_progress: f64,<br>}</pre><pre>fn update(&amp;mut self) {<br>    // Ease-out for smooth deceleration<br>    self.scroll_position += (target - current) * 0.2;<br>    <br>    // Fade in the highlight<br>    self.selection_highlight = min(1.0, highlight + 0.15);<br>}</pre><p>It runs at 60fps when animating, drops to 10fps when idle to save CPU. The result feels smooth in a way most TUIs just don’t.</p><h3>GitHub Copilot CLI: The Real MVP</h3><p>Here’s the thing: This was my first real Rust project that involved TUIs, parsers, async HTTP, all of it. I was basically learning everything as I went.</p><p>GitHub Copilot CLI became my teaching assistant, my documentation search engine, and my rubber duck all at once. And I never had to leave my terminal.</p><p>Let me show you exactly how it helped at each stage.</p><h3>Stage 1: Figuring Out the syn Crate</h3><p>THE PROBLEM: I’m staring at syn’s documentation trying to figure out how to extract struct fields with their visibility modifiers. The docs are comprehensive but dense. I just want to see an example.</p><p>WHAT I DID:</p><pre>gh copilot suggest &quot;parse rust struct with syn extract fields visibility&quot;</pre><p>WHAT COPILOT GAVE ME:</p><pre>use syn::{ItemStruct, Fields, Visibility};</pre><pre>match &amp;st.fields {<br>    Fields::Named(named) =&gt; {<br>        for field in &amp;named.named {<br>            let name = field.ident.as_ref().unwrap();<br>            let ty = &amp;field.ty;<br>            let vis = match &amp;field.vis {<br>                Visibility::Public(_) =&gt; &quot;pub&quot;,<br>                Visibility::Crate(_) =&gt; &quot;pub(crate)&quot;,<br>                _ =&gt; &quot;private&quot;,<br>            };<br>            // Process field...<br>        }<br>    }<br>    // Handle Tuple and Unit structs...<br>}</pre><p>THE IMPACT: This single pattern became the foundation for everything. I just extended it to handle enums, traits, impl blocks, modules — all the Rust item types.</p><p>TIME SAVED: Probably 8 hours of docs-diving and trial-and-error.</p><h3>Stage 2: Building Layouts with Ratatui</h3><p>THE PROBLEM: I wanted multiple panels, proper borders, scroll support. But Ratatui’s constraint system was confusing me. How do you even compose these layouts?</p><p>WHAT I ASKED:</p><pre>gh copilot explain &quot;ratatui layout constraints nested vertical horizontal&quot;</pre><p>WHAT I LEARNED: Layouts are composable. You can use Constraint::Percentage(20) for flexible sizing and Constraint::Length(3) for fixed. Nest them for complex UIs. It’s like Flexbox but for terminals.</p><p>Then:</p><pre>gh copilot suggest &quot;ratatui scrollable text panel with border&quot;</pre><p>GOT THIS PATTERN:</p><pre>let block = Block::default()<br>    .borders(Borders::ALL)<br>    .border_style(border_style)<br>    .title(&quot; Inspector &quot;);</pre><pre>let paragraph = Paragraph::new(lines)<br>    .block(block)<br>    .scroll((scroll_offset as u16, 0))<br>    .wrap(Wrap { trim: false });</pre><pre>paragraph.render(area, buf);</pre><p>Built my entire UI system in one afternoon. The inspector panel, the list view, the search bar — all using variations of this pattern.</p><p>TIME SAVED: At least 6 hours of fighting with layouts.</p><h3>Stage 3: Fuzzy Search That Actually Works</h3><p>THE PROBLEM: I wanted VSCode-level search. Type a few letters, get relevant results instantly.</p><p>WHAT I ASKED:</p><pre>gh copilot suggest &quot;rust crate for fuzzy string matching with scoring&quot;</pre><p>THE ANSWER: Use fuzzy-matcher with SkimMatcherV2.</p><pre>use fuzzy_matcher::skim::SkimMatcherV2;<br>use fuzzy_matcher::FuzzyMatcher;</pre><pre>let matcher = SkimMatcherV2::default();</pre><pre>let mut scored: Vec&lt;_&gt; = candidates<br>    .iter()<br>    .filter_map(|candidate| {<br>        matcher.fuzzy_match(&amp;candidate.name, query)<br>            .map(|score| (candidate, score))<br>    })<br>    .collect();</pre><pre>scored.sort_by(|a, b| b.1.cmp(&amp;a.1));</pre><p>It worked on the first try. Like, actually worked. Those moments are rare and beautiful in programming.</p><p>TIME SAVED: 4 hours of researching fuzzy search algorithms.</p><h3>Stage 4: Cargo.toml Parsing</h3><p>THE PROBLEM: Parsing Cargo.toml manually would be insane. There are workspaces, transitive dependencies, version specs, feature flags…</p><p>THE SOLUTION:</p><pre>gh copilot explain &quot;cargo metadata rust crate dependencies workspace&quot;</pre><p>Learned about cargo_metadata — a crate that gives you structured JSON output of your entire dependency graph.</p><pre>use cargo_metadata::MetadataCommand;</pre><pre>let metadata = MetadataCommand::new()<br>    .manifest_path(&amp;manifest_path)<br>    .exec()?;</pre><pre>let root = metadata.root_package()?;</pre><pre>for dep in &amp;root.dependencies {<br>    if dep.kind == DependencyKind::Normal {<br>        // Process dependency...<br>    }<br>}</pre><p>The entire dependency analysis feature was built in one evening.</p><p>TIME SAVED: 5 hours minimum.</p><h3>Stage 5: crates.io Integration</h3><p>THE PROBLEM: Wanted to show live crate info (descriptions, GitHub stars, licenses). Never done HTTP in Rust before.</p><p>WHAT I ASKED:</p><pre>gh copilot suggest &quot;rust async http get crates.io api reqwest&quot;</pre><p>THE PATTERN:</p><pre>use reqwest::blocking::Client;</pre><pre>fn fetch_crate_docs(name: &amp;str) -&gt; Result&lt;CrateDoc&gt; {<br>    let client = Client::new();<br>    let url = format!(&quot;https://crates.io/api/v1/crates/{}&quot;, name);<br>    <br>    let response = client.get(&amp;url).send()?;<br>    let json: serde_json::Value = response.json()?;<br>    <br>    Ok(CrateDoc {<br>        name: json[&quot;crate&quot;][&quot;name&quot;].as_str()?.to_string(),<br>        description: json[&quot;crate&quot;][&quot;description&quot;].as_str().map(String::from),<br>        repository: json[&quot;crate&quot;][&quot;repository&quot;].as_str().map(String::from),<br>    })<br>}</pre><p>Then for GitHub stats, asked about parsing repo URLs and hitting their API. Got that working too.</p><p>Full integration in one night.</p><p>TIME SAVED: 3 hours of API documentation.</p><h3>Stage 6: Cross-Platform Paths</h3><p>THE PROBLEM: Windows paths use backslashes. Unix uses forward slashes. I needed to convert file paths to module paths (src/analyzer/parser.rs → [“analyzer”, “parser”]) in a way that works everywhere.</p><p>THE ASK:</p><pre>gh copilot suggest &quot;rust pathbuf strip prefix get module path vector&quot;</pre><p>THE SOLUTION:</p><pre>fn derive_module_path(path: &amp;Path) -&gt; Vec&lt;String&gt; {<br>    path.iter()<br>        .skip_while(|c| *c != &quot;src&quot;)<br>        .skip(1)<br>        .filter_map(|c| {<br>            let s = c.to_str()?;<br>            if s.ends_with(&quot;.rs&quot;) {<br>                Some(s.trim_end_matches(&quot;.rs&quot;).to_string())<br>            } else {<br>                Some(s.to_string())<br>            }<br>        })<br>        .filter(|s| s != &quot;lib&quot; &amp;&amp; s != &quot;main&quot; &amp;&amp; s != &quot;mod&quot;)<br>        .collect()<br>}</pre><p>Works on Windows, Mac, Linux. No platform-specific code needed.</p><p>TIME SAVED: 2 hours of debugging path separators.</p><h3>Stage 7: Animation Polish</h3><p>THE PROBLEM: I wanted smooth, momentum-based scrolling. Not jumpy, not janky, just… smooth.</p><p>WHAT I ASKED:</p><pre>gh copilot suggest &quot;rust easing functions cubic ease in out animation&quot;</pre><p>GOT THE MATH:</p><pre>pub fn ease_out(t: f64) -&gt; f64 {<br>    1.0 - (1.0 - t).powi(3)<br>}</pre><pre>pub fn ease_in_out(t: f64) -&gt; f64 {<br>    if t &lt; 0.5 {<br>        4.0 * t * t * t<br>    } else {<br>        1.0 - (-2.0 * t + 2.0).powi(3) / 2.0<br>    }<br>}</pre><pre>// Apply it<br>fn update(&amp;mut self) {<br>    let diff = self.target - self.current;<br>    self.velocity = diff * 0.15;<br>    self.current += self.velocity;<br>    <br>    if diff.abs() &lt; 0.5 {<br>        self.current = self.target;  // Snap when close<br>    }<br>}</pre><p>Result: 60fps butter-smooth scrolling. In a terminal. Because why not.</p><p>TIME SAVED: 2 hours of tweaking animation curves.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TR5yWJwzA-7GYjv4rlCXLQ.png" /></figure><h3>Technical Challenges and How I Solved Them</h3><h3>Challenge 1: Parsing Large Projects Without Freezing</h3><p>THE PROBLEM: Analyzing tokio (200+ files) froze the terminal for 10 seconds.</p><p>THE SOLUTION:</p><p>Moved parsing to background threads</p><p>Added splash screen with wave animation</p><p>Pre-computed search indices</p><p>Incremental rendering</p><p>KEY INSIGHT FROM COPILOT:</p><pre>gh copilot explain &quot;rust rayon parallel iterator parse files&quot;</pre><p>Learned to use rayon for parallel parsing:</p><pre>use rayon::prelude::*;</pre><pre>let items: Vec&lt;_&gt; = files<br>    .par_iter()  // Parallel iterator<br>    .filter_map(|path| analyzer.analyze_file(path).ok())<br>    .flatten()<br>    .collect();</pre><p>RESULT: 200 files parsed in ~2 seconds.</p><h3>Challenge 2: Memory Efficiency</h3><p>THE PROBLEM: Storing full syntax trees for 50,000 items used 500MB RAM.</p><p>THE SOLUTION:</p><p>Extract only needed info (no full AST retention)</p><p>Use String instead of TokenStream</p><p>Lazy-load inspector details</p><p>Cache only visible items</p><p>COPILOT HELPED IDENTIFY MEMORY HOTSPOTS:</p><pre>gh copilot explain &quot;rust drop ast reduce memory after parsing&quot;</pre><h3>Challenge 3: Responsive Search on Large Projects</h3><p>THE PROBLEM: Filtering 10,000 items felt laggy (100ms+ per keystroke).</p><p>THE SOLUTION:</p><p>Filter by active tab (only search functions in Functions tab)</p><p>Limit displayed results to 50</p><p>Debounce search input</p><p>Run filtering in background thread</p><p>CODE PATTERN FROM COPILOT:</p><pre>// Filter by tab<br>let candidates: Vec&lt;_&gt; = match current_tab {<br>    Tab::Functions =&gt; items.iter().filter(|i| matches!(i, AnalyzedItem::Function(_))),<br>    Tab::Types =&gt; items.iter().filter(|i| matches!(i, AnalyzedItem::Struct(_) | AnalyzedItem::Enum(_))),<br>    // ...<br>}.collect();</pre><pre>// Fuzzy match + score<br>let scored = filter_candidates(&amp;candidates, query);</pre><pre>// Take top 50<br>scored.iter().take(50).collect()</pre><p>RESULT: Search always under 16ms (60fps responsive).</p><h3>Challenge 4: Cross-Platform Terminal Control</h3><p>THE PROBLEM: Terminal control sequences differ between Windows (ConPTY), macOS (BSD), Linux (ANSI).</p><p>THE SOLUTION: Use crossterm crate (it handles platform differences).</p><p>COPILOT TAUGHT ME:</p><pre>gh copilot explain &quot;crossterm enable raw mode terminal colors rust&quot;</pre><pre>use crossterm::{<br>    terminal::{enable_raw_mode, disable_raw_mode},<br>    event::{self, Event, KeyCode},<br>    execute,<br>};</pre><pre>// Works on Windows, macOS, Linux<br>enable_raw_mode()?;<br>execute!(stdout, EnterAlternateScreen)?;</pre><pre>// ... TUI code ...</pre><pre>disable_raw_mode()?;<br>execute!(stdout, LeaveAlternateScreen)?;</pre><p>RESULT: One codebase, three platforms. No conditional compilation needed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*edEK4NcbU5WPrltBS9uiTg.jpeg" /></figure><h3>What Makes Oracle Different?</h3><h3>1. Built for the Terminal, Not Adapted to It</h3><p>Most code browsers are GUIs first. Oracle was designed from the ground up for terminal use:</p><p>Vim keybindings (j/k, g/G, /)</p><p>Works over SSH (no X forwarding)</p><p>One command: oracle</p><p>Zero configuration</p><h3>2. Deep Rust Understanding</h3><p>Oracle doesn’t just grep for text. It understands:</p><p>Visibility (pub, pub(crate), private)</p><p>Lifetimes and generics</p><p>Trait bounds and where clauses</p><p>Async/const/unsafe modifiers</p><p>Derive macros and attributes</p><p>Example: Search for “deserialize” and Oracle shows the Deserialize trait, all impl blocks for it, functions using it as a bound, and structs deriving it.</p><h3>3. Fast Enough to Be Reflexive</h3><p>Startup: under 2 seconds for 200 files</p><p>Search: under 16ms per keystroke</p><p>Navigation: 60fps animations</p><p>Memory: ~50MB for large projects</p><p>Fast enough that you don’t think about it.</p><h3>4. Beautiful by Default</h3><p>Four carefully crafted themes:</p><p>Default Dark — Clean and professional</p><p>Nord — Cool blues and muted pastels</p><p>Catppuccin Mocha — Warm and cozy</p><p>Dracula — High contrast drama</p><p>All with syntax highlighting, smooth scrolling, and polished UI.</p><h3>Real-World Usage</h3><h3>Scenario 1: Understanding Third-Party Crates</h3><p>You add tokio to your project. How does spawn work? What traits does Future require?</p><p>BEFORE ORACLE:</p><p>Clone the tokio repo</p><p>Grep through files (47 matches for “pub fn spawn”)</p><p>Read docs (if you remember the module path)</p><p>Wait 30 seconds for cargo doc to build</p><p>WITH ORACLE:</p><pre>oracle ~/.cargo/registry/src/*/tokio-*</pre><p>Press 4 to go to Crates tab</p><p>Navigate to “tokio”, press Enter</p><p>Type “spawn” in search</p><p>See signature, docs, parameters, bounds</p><p>Press ‘o’ to open docs.rs for deep dive</p><p>TIME SAVED: 5 minutes → 30 seconds.</p><h3>Scenario 2: Navigating Your Own Project</h3><p>You’re debugging a function. What does it call? What calls it? What trait bounds does it have?</p><p>BEFORE ORACLE:</p><pre>rg &quot;fn process_request&quot;  # Find definition<br>rg &quot;process_request\(&quot;   # Find call sites (regex required)<br># Open in editor, read 200 lines of context</pre><p>WITH ORACLE:</p><pre>oracle</pre><p>Type “process_request”</p><p>Press Enter</p><p>See full signature with parameters, return type with error handling, documentation, and source location</p><p>Press ‘l’ to see the inspector, scroll through impl</p><p>TIME SAVED: 3 minutes → 20 seconds.</p><h3>Scenario 3: Learning Rust Patterns</h3><p>You’re learning async Rust. How do pros structure their code?</p><p>BEFORE ORACLE:</p><p>Clone exemplar projects like axum</p><p>Read through src/ (20 files, where to start?)</p><p>Open lib.rs (1200 lines…)</p><p>WITH ORACLE:</p><pre>oracle ~/code/axum</pre><p>LEARNING CURVE: Weeks → Days.</p><h3>Installation and Getting Started</h3><h3>Prerequisites</h3><p>Rust 1.75+ (install via rustup.rs)</p><p>Git (to clone the repo)</p><h3>Install from Source</h3><pre>git clone https://github.com/yashksaini-coder/oracle.git<br>cd oracle<br>cargo install --path .</pre><p>Note: Publishing to crates.io coming soon.</p><h3>Usage</h3><pre># Analyze current directory (must have Cargo.toml)<br>oracle</pre><pre># Analyze specific project<br>oracle ~/code/my-rust-project</pre><pre># Analyze a single file<br>oracle src/main.rs</pre><pre># Set GitHub token for API (optional, for crates.io features)<br>export GITHUB_TOKEN=ghp_yourtoken<br>oracle</pre><h3>Conclusion</h3><p>Building Oracle taught me that great developer tools can live entirely in the terminal. You don’t need Electron, you don’t need a browser, you don’t even need a GUI.</p><p>If you work with Rust, give Oracle a try. It might change how you explore codebases. Please support the open source project By Star that encourages me to build more pretty TUI stuff.</p><p>GitHub Repository: github.com/yashksaini-coder/oracle</p><p>Built with Rust, Ratatui and GitHub Copilot CLI</p><p>Questions? Feedback? Want to contribute?</p><p>Drop a comment or open an issue on GitHub. Let’s make terminal tools great again.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5f4d1e77acce" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>