11# Setting Up Your Environment
22
3- Before we can build a Copper project, we need Rust and the Copper project template.
3+ Before we can build a Copper project, we need Rust 1.95 or newer and the Copper project
4+ bootstrap tool.
45
56## Install Rust
67
@@ -10,34 +11,27 @@ Follow the official installation guide at <https://rust-lang.org/tools/install/>
1011curl --proto ' =https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
1112```
1213
13- After installation, make sure ` cargo ` is available:
14+ After installation, make sure ` cargo ` is available and recent enough :
1415
1516``` bash
1617cargo --version
18+ rustc --version
1719```
1820
19- ## Install cargo-generate
21+ ## Install cargo-cunew
2022
21- ` cargo-generate ` lets you scaffold a new Copper project from the official template :
23+ ` cargo-cunew ` scaffolds a new Copper project from the official Copper templates :
2224
2325``` bash
24- cargo install cargo-generate
26+ cargo install cargo-cunew
2527```
2628
2729## Generate our first simple Copper project
2830
29- Clone the copper-rs repository and use the built-in template tool :
31+ Generate a new project directly :
3032
3133``` bash
32- git clone https://github.com/copper-project/copper-rs
33- cd copper-rs/templates
34-
35- cargo +stable generate \
36- --path cu_project \
37- --name my_project \
38- --destination . \
39- --define copper_source=local \
40- --define copper_root_path=../..
34+ cargo cunew my_project
4135```
4236
4337This generates a complete, ready-to-compile Copper project at the path you specify.
@@ -77,4 +71,4 @@ It will compile and run, and you'll start to receive some messages:
777100:00:01.1781 [Debug] Sink Received message: 43
7872```
7973
80- Kill the process and let's move to the next chapter.
74+ Kill the process and let's move to the next chapter.
0 commit comments