Get image path when opening an image with build

⚓ Rust    📅 2025-06-14    👤 surdeus    👁️ 5      

surdeus

Warning

This post was published 62 days ago. The information described in this article may have changed.

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