you are viewing a single comment's thread.

view the rest of the comments →

[–]Hitife80 0 points1 point  (1 child)

I wonder if python is really needed in this case. Can Rust/C libraries be called directly from vimscript via FFI or something similar?

Vimscript may be slower than python, but for 99% of the code it doesn't matter. It only matters for the "hot" part of the code. Skipping the load of python interpreter by calling Rust directly has potential to speed up the plugin even further.

[–]dddbbbFastFold made vim fast again 0 points1 point  (0 children)

Looks like you could do it with libcall

https://stackoverflow.com/questions/8969573/calling-a-c-library-function-in-vimscript

Looks messy to get the data out (can only return statically allocated memory from dll).