Hands on Rust: Need help with error - thread 'main' panicked at 'Failed to load texture

No problem at all. Thank you for taking the time and replying Sir.

I have done exactly as the book said and have kept the resources directory in the same folder with the executable including all the resource files too.

I used the “cargo build --release” command to create the binary and then copied the executable from the target/release. I’ve also tried to use the debug build. It gives me the same result. I used the code from Github too but I get the same results.

Side Note: When I embed all the resources like embedded_resource!(TERMINAL_FONT, "../resources/terminal8x8.png");, the program works.

1 Like