How launch any file using default program using Rust (like Python's `os.startfile()`)

Is there a rust method to launch file (using default application) equivalent to os.startfile() in python. For example, I need to launch an "mp3 file" using rust. In python it is os.startfile('audio.mp3') . This will open default media player and start playing that file. I need to do the same with Rust Language.

Try the opener crate.

3 Likes

Thank you.. it worked.. but i found another crate called “open”. It has multiple methods to launch a file