C Language Compiler

Language: Rust | Focus: Compiler Design, LLVM

A three-phase compiler implementing lexical analysis, parsing, and LLVM-based code generation for a subset of C.

Key Features

  • Complete lexer with support for single-line and block comments
  • Recursive descent parser building Abstract Syntax Trees (AST)
  • LLVM code generation following System V ABI calling conventions
  • Control flow including conditionals, loops (while/for), break/continue
  • Multiple data types (int, char, long, double, float, void)
  • Function calls with argument passing and local variable scoping

Technical Highlights

  • Implements operator precedence for binary expressions
  • Proper stack frame management and variable storage
  • Debugging information generation for better error messages
  • Support for unary operations (logical NOT, bitwise NOT, negation)
  • Ternary expressions and comparison operators

Architecture

Source Code → Lexer → Parser → AST → LLVM CodeGen → Executable

Status: Active development. Core language features implemented, working on arrays and pointers.

View on GitHub | Stack: Rust, LLVM 18.1, Clang


MEV Searcher Bot

Language: Rust | Focus: DeFi, High-Performance Systems

A real-time blockchain arbitrage bot that monitors DEX events, identifies price discrepancies, and executes profitable trades using flashloans.

Core Components

Event Monitoring System

  • Real-time mempool monitoring via WebSocket connections
  • Block event tracking for executed transactions
  • DEX-specific event observers (swaps, liquidity changes)

Opportunity Detection

  • Multi-DEX price calculator for arbitrage path discovery
  • Profit evaluation accounting for gas costs and slippage
  • Optimal route finding across liquidity pools

Execution Engine (In Progress)

  • Flashloan integration for zero-capital arbitrage
  • Transaction simulation for profit verification
  • Gas optimization strategies

Technical Challenges

  • Performance: Asynchronous processing for sub-second opportunity detection
  • Risk Management: Circuit breakers and validation layers
  • Gas Optimization: Dynamic pricing and bundle merging strategies

Data Sources

  • Ethereum nodes (archive and WebSocket access)
  • DEX subgraphs via TheGraph
  • Private mempool RPC endpoints

Status: Phase 2 complete (opportunity detection). Building simulation engine.

View on GitHub | Stack: Rust, Web3, Tokio, Ethers-rs


Network Packet Sniffer

Language: Rust | Focus: Network Programming, Protocol Analysis

Two implementations of a network packet analyzer: a traditional libpcap-based sniffer and a modern eBPF-based version for enhanced performance.

Standard Version

Real-time packet capture and analysis with multi-protocol support.

Features

  • Protocol parsing for Ethernet, IPv4, TCP, UDP, ARP, ICMP
  • MAC address manufacturer identification
  • Port service detection for common protocols
  • Advanced filtering: source/destination IP, ports, protocol type, packet size

Example Filters

# Filter by source IP and protocol
rsniffer --src-ip 192.168.1.100 --protocol TCP

# Filter by port range and packet size
rsniffer --port-destination 443 --min-pack-size 1000

eBPF Version

High-performance packet capture using Linux kernel eBPF programs.

Advantages

  • Minimal overhead: Filtering happens in kernel space
  • Zero-copy: Direct access to packet data without copying
  • Programmable: Custom filtering logic in eBPF

Technical Implementation

  • eBPF programs compiled to kernel bytecode
  • Ring buffer for efficient user-space communication
  • Cross-platform build support (Intel/Apple Silicon)

Protocol Support

  • Layer 2: Ethernet, ARP, VLAN
  • Layer 3: IPv4, ICMP, IPv6 detection
  • Layer 4: TCP (with flag analysis), UDP
  • Application Layer: HTTP, HTTPS, SSH, DNS, SMTP, and more

Use Cases: Network troubleshooting, security analysis, protocol learning

View on GitHub | Stack: Rust, libpcap, eBPF, Aya


CHIP-8 Emulator

Language: C++20 | Focus: Emulation, Low-Level Programming

A complete CHIP-8 interpreter implementing the classic 1970s virtual machine specification.

Implementation Details

CPU & Memory

  • 4KB RAM with proper memory mapping (0x000-0xFFF)
  • 16 general-purpose 8-bit registers (V0-VF)
  • 16-level stack for subroutine calls
  • Program counter and index register
  • All 35 standard opcodes implemented

Graphics & I/O

  • 64x32 pixel monochrome display with XOR drawing
  • Built-in hexadecimal font set (0-F)
  • 16-key hexadecimal keypad input system
  • 60Hz delay and sound timers

Architecture Highlights

  • Fetch-decode-execute cycle implementation
  • Proper opcode handling with bit manipulation
  • Stack-based subroutine management
  • Random number generation for probabilistic instructions

Technical Approach

Clean separation of concerns with distinct header/implementation files. CMake-based build system for cross-platform compatibility.

Status: Core emulator complete. All standard games run correctly.

View on GitHub | Stack: C++20, CMake

All projects are open source and available on GitHub. Feel free to explore the code, open issues, or contribute improvements.