Specifying the execution path when using cargo run --example

Hi there,

when running cargo run --example ex1 to run the example ex1 of the actual crate the execution path is the root path of the crate itself. I'd like to store some config files the example is using along with the example in its respective folder. How can I tell the cargo run command to be executed within the specific examples subfolder?

Thx. in advance for any hints.

You need to cd to that folder and run cargo run --example ex1 from there.

I'd not expected it to be THAT SIMPLE :smiley: :smiley: :smiley:

1 Like

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.