It is relatively easy to turn an STM32F103C8T6 (BluePill) into an STLink programmer. All that is needed is a copy of the STLink firmware and a means to flash it. Do a search for STLinkV2.J16.S4 and download it. Flash that binary file into the STM32F103C8T6.
See my other post HERE on the STM32F103C8T6 as it mentions several methods to program (flash) it.
I have several ST-Link programmers so I used the stlink utilities program called st-flash and flashed it via:
st-flash --debug write STLinkV2.J16.S4.bin 0x8000000
The new STM32F103C8T6 STLink can then be upgraded to the latest firmware version from https://www.st.com.
Here is the wiring diagram on how to connect the new STM32F103C8T6 STLink programmer to another STM32F103C8T6 to program it:
Download the Fritzing Diagram from HERE. Actually, the capacitor and 4k7 resistors on the right side of the diagram are not needed (it works fine without them). It also works without the NRST to B0 jumper.
The minimal wiring looks like this: