How do I run a Rust binary from terminal as an app without cargo?

1- Downloaded Rust code from
2- Opened Folder if space-editor in VSCode
3- Opened terminal in VSCode and did: cargo build --release

Now instructions in the above URL say:
Run the binary:

space_editor --image "res/tile_set.png" --map "res/map.ron"

.....but when I execute the above line in the terminal I get:
space_editor: command not found

How do I make the space_editor binary in the /target/release/ folder able to be executed as 'space_editor --image "res/tile_set.png" --map "res/map.ron"'?

You need to move the binary to somewhere in your PATH (something like /usr/local/bin/ or wherever you want to put it.) Or you can just run the command in the folder the binary is in (might have to run it as "./space_editor" depending on platform.)


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.