I have seen code for SWD, but things then get a whole load more complicated, as the host PC needs some form of protocol that communicates with the AVR Arduino
SWD is so simple. No bootloader code needed. No new host PC code needed.
Just connect ST-Link to the unused three pins: GND, SWD data and SWD clock.
Run free ST-Link software GUI. Browse to .hex, flash, done.
Or if you have an IDE that supports ST-Link (gdb, Visual gdb, IAR, Keil (free code size limited), Attolic, etc., then it's just compile and click flash & debug button in the IDE. Then off to the breakpoints - and the user experience is just like breakpoints where the PC's CPU is the target.