I was playing with this for a lathe and did not find a proper solution with stepper
using a stepper shown to be crap for the spindle, I even tried large nema34 16A ones... the torque & speed are just not acceptable, even with FPGA stepper (mesa card and linuxcnc, so I was easily stepping at 2MHz but it's just not something stepper deals with) using encoder and servo worked great on linuxcnc + mesa but I never managed to reproduce this on any of the 32bit boards (rrf, redeem, smoothie..), especially as there's no way to push encoder data back into them... also stepping speed on all of them is too slow for high precision encoder on the servo ..I do have a small mill where I use smoothieware (RRF would work even better maybe) where I control the spindle by SPI, I have a small pic that listen to SPI and it gets the speed for the spindle from SPI from the firmware and then it converts it to 1-10V input for the VFD ... (I lost that firmware for the pic 😞 but it's a 30min job to write for any mcu, I need to write it again I need another one for a bit different mini mill I have)