Technical White Papers & Documentation
BorrowScope is a personal project I'm building to deepen my understanding of Rust's ownership and borrowing system. The goal is to instrument Rust code and visualize what actually happens at runtime — when values are created, cloned, borrowed, moved, and dropped. It spans multiple crates: a runtime library for event-sourced ownership tracking, a proc macro for automatic instrumentation, a static analyzer that extracts type information using rust-analyzer's semantic APIs, and planned components for graph visualization, memory layout analysis, a CLI, and a web interface. None of this is production-ready — it's a learning and development journal in code form, exploring how far you can push Rust's compile-time and runtime introspection capabilities.
borrowscope-runtimeRuntime ownership tracking library for Rust. Provides event-sourced architecture, zero-cost abstractions, and ownership graph construction.
v0.1.2borrowscope-macroProcedural macro crate providing the #[trace_borrow] attribute for automatic instrumentation of Rust code to track ownership and borrowing operations at runtime.
borrowscope-analyzerStatic pre-build analysis tool that uses rust-analyzer's semantic APIs to extract full type information for every variable binding, bridging the type information gap that procedural macros cannot cross.
Under Developmentborrowscope-graphGraph data structures and algorithms for ownership visualization. Includes conflict detection, query builders, D3.js export, and timeline-based analysis of borrow relationships.
Future RoadmapNo articles yet
borrowscope-memoryMemory layout analysis and allocation tracking. Bridges logical ownership with physical memory usage—stack vs heap visualization, cache line analysis, and fragmentation detection.
Future RoadmapNo articles yet
borrowscope-cliCommand-line interface for analyzing and visualizing Rust ownership. Includes Cargo integration, Graphviz exports, and an embedded web server for interactive exploration.
Future RoadmapNo articles yet
borrowscope-webWeb application and REST API for interactive ownership graph exploration. Built with Actix-web, featuring Swagger UI, real-time updates, and rich visualization components.
Future RoadmapNo articles yet