Svg or gif programming

how to program .svg or .gif in rust language to create gui button

You need to tell us more details, e.g. which gui library are you using?