Get image path when opening an image with build

⚓ rust    📅 2025-06-14    👤 surdeus    👁️ 3      

surdeus

I'm trying to build my own image viewer in sdl2. My goal now is when I open a png, the rust build exec needs to open with the image. I can't manage to find a way to get the path of the image that I opened with the executable. If I use current_dir() it gives me the project directory not the image directory.

4 posts - 3 participants

Read full topic

🏷️ rust_feed