Welcome to rust-euler!
. ├── hello-world │ ├── Cargo.lock │ ├── Cargo.toml │ ├── src │ │ └── main.rs │ └── target │ ├── CACHEDIR.TAG │ └── debug │ ├── build │ ├── deps │ │ ├── hello_world-99ed12927bc23265 │ │ └── hello_world-99ed12927bc23265.d │ ├── examples │ ├── hello-world │ ├── hello-world.d │ └── incremental │ └── hello_world-356t5tm55t73o │ ├── s-gwdpsicqq0-7i3zl2-224kkz2zegjy1l2z5c6uqy6yz │ │ ├── 1f68qjuhijjmc5i7.o │ │ ├── 3sbtbb5h8ru55pik.o │ │ ├── 3wqjr936igavuvx1.o │ │ ├── 3xa1dh1eeps7pkl3.o │ │ ├── 4rwjz7g0puotc3i.o │ │ ├── 541blf7fzejf93ta.o │ │ ├── dep-graph.bin │ │ ├── query-cache.bin │ │ └── work-products.bin │ └── s-gwdpsicqq0-7i3zl2.lock └── README.md
- Download the zip file or clone this repository.
- The source code is in the
.rs
file, usually with the path<projectName>/src/main.rs
. The pre-built executable included in<projectName>/target/debug/<executable>
. On linux,cd
to the directory with the executable and run the code with:
$ ./<executable name>
For example, in the project hello-world
, main.rs
compiled with rustc
(managed by cargo) will output a file called hello-world
which is the executable. These are already included in the repository. You would then:
``` $ cd ./path/to/rust-euler/euler1/ $ ls Cargo.lock Cargo.toml src target $ cd ./target/ $ ls CACHEDIR.TAG debug $ cd ./debug/ $ ls build deps examples hello-world hello-world.d incremental $ ./hello-world ```
to run the code. Alternatively, if you know how to, cargo run
should do the job if you clone and setup the repository correctly.
Note the space is included at the start of the command.