BorrowChecker.jl: An Experimental Borrow Checker for Julia

2025-01-18
BorrowChecker.jl: An Experimental Borrow Checker for Julia

BorrowChecker.jl is a Julia package that simulates Rust-like ownership and borrowing semantics through a macro-based system, performing runtime checks during development and testing to flag memory safety issues. It doesn't guarantee absolute memory safety but aids in writing safer code. The library uses macros like `@own`, `@move`, `@clone` to manage object ownership and `@lifetime` blocks to manage reference lifetimes, while also offering an `@managed` block for automatic borrow checking. While not perfect, it's a valuable tool for developers aiming to improve memory safety in their Julia code.

Development