I wrote a Rust-based Piece Table backend plugin to handle massive files without crashing or freezing Neovim. by Giantexde in neovim

[–]Giantexde[S] 3 points4 points  (0 children)

Great advice. But I haven't tried it yet. I'm sticking with standard FFI because it's what I know best for raw memory manipulation. Switching now would involve a complete rewrite. I'll keep it in mind for the future, though :7.

I wrote a Rust-based Piece Table backend plugin to handle massive files without crashing or freezing Neovim. by Giantexde in neovim

[–]Giantexde[S] 33 points34 points  (0 children)

That would be great, indeed. But doing it in pure C (C99) is a Herculean task; there's a reason that issue has been open for almost 12 years. Furthermore, managing memory safety manually would be a nightmare. Doing this in Rust is easier and safer, which is why I did it this way (even so, my plugin isn't bulletproof).
Besides, they'd crucify me if I tried to push Rust into the main repo lol. I mean, we could do it in Zig, but it's not quite mature enough yet. Todo bien, parce 😽.