Let's assume I have a game with the following directory structure:
/src
/resources
Cargo.toml
I would like cargo build
to copy the files in the resources
directory and paste them in the same directory as the executable file.
I know it is possible to do this using a custom build script, but this seems to be a common case that deserves special treatment. So the question is: does cargo provide a standard way of copying files to the target directory (using just Cargo.toml
)?
来源:https://stackoverflow.com/questions/31080757/copy-files-to-the-target-directory-after-build