Graph architecture: RefCells all the way down
⚓ Rust 📅 2025-11-26 👤 surdeus 👁️ 8Hello, I'm working on the first steps of a generic graph system for personal projects and the RefCell is being both my savior and my nemesis.
Here's a playground link to the issue isolated as much as possible: playground
Essentially, I want to separate the actual storage of nodes from the graph logic. To do so, I need to keep my storage within a RefCell for ease of modification, and the nodes themselves in RefCells as well to avoid concurrent borrow issues with the storage.
Is there any way to make this work? Or is there perhaps another architecture you'd recommend?
3 posts - 3 participants
🏷️ Rust_feed