Rust seems like a good language for git given its performance and memory-safety, no?
Just how big is your repo that, other than cloning, git operations induce user-noticable performance problems?
Git implemented in Rust
121–122 of 122 posts
Re: Git implemented in Rust
#122Earlier quoted context omitted.
Graphs are harder if you try to use pointers to identify neighbors. In Rust, a pointer is not merely an index into memory; it is a statement and guarantee about how that memory will be accessed. These semantics are more than a graph structure needs. To "get around" this (but see the next paragraph), we usually associate each node to a simple identifier such as an integer (usize), and store all nodes into a Vec. Neigh…
There are benefits but they come with downsides: you can have node ids pointing to deleted nodes, and collecting unused nodes is up to you. If you want to avoid fragmentation, you need to recycle nodes and possibly node ids as well. These are things garbage collectors handle. It's not all that different from a database, though.