Leonardo bootloader

Hello,
I want to use my arduino with rust, which have merged the rust-avr project inside the main rust codebase.
But i also want to be able to push my code using usb, for that I need to push the bootloader and my binary from rust.
I'v fount the repository of the avr bootloader, it's this one right ? github.com/arduino/ArduinoCore-avr/bootloaders
But then… whitch one I should choose to get a simple bootlobder that allow me to push my code over usb and maybe use the serial over usb feature.

The bootloader used for the Leonardo is defined here:

leonardo.bootloader.file=caterina/Caterina-Leonardo.hex

That path is relative to the bootloadersfolder you linked to.

pert:
The bootloader used for the Leonardo is defined here:
ArduinoCore-avr/boards.txt at 1.8.3 · arduino/ArduinoCore-avr · GitHub

Thanks, it's not easy to find in whitch file that was defined.
Do you know if the optiboot can run on a leonardo ?

Looks like there is some good information about optiboot on the Leonardo's ATmega32U4 here:

Optiboot does serial bootloading only. It wouldn't help you load over the native USB on the chip (you'd need a separate USB/Serial converter.) That's one of the reasons that this remains an "issue" even though the idea is ~5 years old. :frowning:

If you already have an Arduino, it already has a bootloader, and you can load .hex files onto it using avrdude, regardless of the language they were written in.

Thanks i'v found the good way to send the bootloader and any bin/hex/elf file.