You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> **Alternative methods:** See the [Installation Guide](docs/guides/installation.md) for shell script, Homebrew, Rust setup, or platform-specific instructions.
8
20
9
21
Then follow the **[Quickstart](docs/quickstart.md)** to deploy your first canister in under 5 minutes.
Copy file name to clipboardExpand all lines: docs/guides/installation.md
+82-46Lines changed: 82 additions & 46 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,83 +2,93 @@
2
2
3
3
Set up everything you need to build and deploy canisters on the Internet Computer.
4
4
5
-
This guide covers:
6
-
- Prerequisites (Node.js)
7
-
- Installing icp-cli (the core tool)
8
-
- Installing language toolchains (Rust or Motoko compilers)
9
-
- Installing ic-wasm for optimization
5
+
**What you'll install:**
10
6
11
-
## Prerequisites
7
+
| Tool | Purpose |
8
+
|------|---------|
9
+
|**icp-cli**| Core CLI for building and deploying canisters |
10
+
|**ic-wasm**| Optimizes WebAssembly for the Internet Computer |
11
+
|**Language toolchain**| Motoko compiler (via mops) or Rust compiler |
12
12
13
-
[Node.js](https://nodejs.org/) (LTS recommended) is required for:
14
-
- Installing the Motoko toolchain
15
-
- Building frontend canisters
13
+
> **Windows users:** Local networks require [Docker Desktop](https://docs.docker.com/desktop/setup/install/windows-install/), and Motoko requires [WSL](https://learn.microsoft.com/en-us/windows/wsl/install). For the full experience, install both and run commands inside WSL. Rust-only projects deploying to mainnet can run natively on Windows.
16
14
17
-
> **Rust-only projects:** If you're only building Rust backend canisters without a frontend, you can skip Node.js.
15
+
> **Linux users:** The pre-compiled binary requires system libraries that may be missing on minimal installs. If installation fails or `icp` won't start, install these dependencies:
> -**Motoko canisters** require [WSL](https://learn.microsoft.com/en-us/windows/wsl/install) — the Motoko compiler doesn't run natively on Windows. Install icp-cli inside WSL and follow the macOS/Linux instructions instead.
40
-
> -**Rust canisters** work natively on Windows without WSL
41
-
42
-
**Alternative: Homebrew (macOS only)**
41
+
**Rust** (if not already installed):
43
42
44
43
```bash
45
-
brew install dfinity/tap/icp-cli
44
+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
45
+
rustup target add wasm32-unknown-unknown
46
46
```
47
47
48
-
To update later: `brew upgrade dfinity/tap/icp-cli`
49
-
50
-
### Verify Installation
48
+
**3. Verify installation:**
51
49
52
50
```bash
53
51
icp --version
52
+
ic-wasm --version
54
53
```
55
54
56
-
## Install Language Toolchains
55
+
---
57
56
58
-
icp-cli uses your language's compiler to build canisters. Install what you need:
57
+
## Alternative Installation Methods
59
58
60
-
**Rust canisters:**
59
+
If you prefer not to use npm, or need platform-specific options, see the sections below.
61
60
62
-
If you don't have Rust installed, install it from [rustup.rs](https://rustup.rs/):
61
+
### icp-cli
62
+
63
+
**Shell Script (macOS / Linux / WSL):**
63
64
64
65
```bash
65
-
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs| sh
66
+
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/dfinity/icp-cli/releases/latest/download/icp-cli-installer.sh| sh
66
67
```
67
68
68
-
Then add the WebAssembly target:
69
+
Restart your shell or follow the instructions shown by the installer.
70
+
71
+
**Shell Script (Windows, for Rust-only mainnet projects):**
## Install ic-wasm (Required for templates and recipes)
85
+
To update later: `brew upgrade dfinity/tap/icp-cli`
86
+
87
+
> **Note:** Homebrew installs ic-wasm as a dependency, so you can skip the ic-wasm installation below.
88
+
89
+
> **Note:**[Node.js](https://nodejs.org/) (LTS recommended) is still required for the Motoko toolchain and frontend canisters when using alternative installation methods.
90
+
91
+
### ic-wasm
82
92
83
93
`ic-wasm` is a WebAssembly post-processing tool that optimizes canisters for the Internet Computer. It provides:
84
94
-**Optimization**: ~10% cycle reduction for Motoko, ~4% for Rust
@@ -87,26 +97,52 @@ mops toolchain init
87
97
-**Shrinking**: Remove unused code and debug symbols
88
98
89
99
**When is it needed?**
90
-
-**Required** if using official templates (motoko, rust, hello-world) - all backend templates use recipes that depend on ic-wasm
91
-
-**Required** if using official recipes (`@dfinity/motoko`, `@dfinity/rust`) - these recipes inject required metadata using ic-wasm
100
+
-**Required** if using official templates (motoko, rust, hello-world) — all backend templates use recipes that depend on ic-wasm
101
+
-**Required** if using official recipes (`@dfinity/motoko`, `@dfinity/rust`) — these recipes inject required metadata using ic-wasm
92
102
-**Not required** if building canisters with custom script steps that don't invoke ic-wasm
93
103
94
104
**Installation:**
95
105
96
-
**Note:** If you installed icp-cli via Homebrew, ic-wasm is already installed as a dependency. Skip this section.
106
+
> **Note:** If you installed icp-cli via Homebrew, ic-wasm is already included. Skip this section.
107
+
108
+
**npm (recommended):**
109
+
110
+
```bash
111
+
npm install -g @icp-sdk/ic-wasm
112
+
```
113
+
114
+
**Shell Script (macOS/Linux):**
97
115
98
-
**macOS/Linux:**
99
116
```bash
100
117
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/dfinity/ic-wasm/releases/latest/download/ic-wasm-installer.sh | sh
Copy file name to clipboardExpand all lines: docs/quickstart.md
+13-3Lines changed: 13 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,11 +2,21 @@
2
2
3
3
Deploy a full-stack app to a local network in under 5 minutes.
4
4
5
-
## Prerequisites
5
+
**Prerequisites:**[Node.js](https://nodejs.org/) (LTS) is required for the installation commands below.
6
6
7
-
Complete the [Installation Guide](guides/installation.md)first.
7
+
> **Windows users:** This quickstart requires [WSL](https://learn.microsoft.com/en-us/windows/wsl/install) (for Motoko) and [Docker Desktop](https://docs.docker.com/desktop/setup/install/windows-install/) (for local networks). Install both first, then run all commands inside WSL.
8
8
9
-
> **Tip:** An npm package for even simpler installation is coming soon.
9
+
## Install
10
+
11
+
```bash
12
+
# icp-cli and ic-wasm (required)
13
+
npm install -g @icp-sdk/icp-cli @icp-sdk/ic-wasm
14
+
15
+
# Motoko toolchain (for Motoko projects)
16
+
npm install -g ic-mops && mops toolchain init
17
+
```
18
+
19
+
> **Alternative methods:** See the [Installation Guide](guides/installation.md) for shell script, Homebrew, or other options.
Copy file name to clipboardExpand all lines: docs/tutorial.md
+23-2Lines changed: 23 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,12 +14,33 @@ In this tutorial, you'll deploy two canisters:
14
14
15
15
## Prerequisites
16
16
17
-
Complete the **[Installation Guide](guides/installation.md)** first.
17
+
**Required:**[Node.js](https://nodejs.org/) (LTS) for the installation commands below.
18
18
19
-
Verify icp-cli is installed:
19
+
> **Windows users:** This tutorial requires [WSL](https://learn.microsoft.com/en-us/windows/wsl/install) (for Motoko) and [Docker Desktop](https://docs.docker.com/desktop/setup/install/windows-install/) (for local networks). Install both first, then run all commands inside WSL.
20
+
21
+
Install the required tools:
22
+
23
+
```bash
24
+
# icp-cli and ic-wasm (required)
25
+
npm install -g @icp-sdk/icp-cli @icp-sdk/ic-wasm
26
+
27
+
# Motoko toolchain (for Motoko projects)
28
+
npm install -g ic-mops && mops toolchain init
29
+
```
30
+
31
+
This installs:
32
+
-**icp-cli** — the core CLI for building and deploying canisters
33
+
-**ic-wasm** — optimizes WebAssembly for the Internet Computer
34
+
-**mops** — Motoko package manager, which also installs the Motoko compiler
35
+
36
+
> **Alternative methods:** See the [Installation Guide](guides/installation.md) for shell script, Homebrew, Rust setup, or other options.
0 commit comments