From a8135c1b93f1324fae81ce9c1d86ec6609236034 Mon Sep 17 00:00:00 2001 From: Jessie Mongeon Date: Wed, 11 Sep 2024 10:43:04 -0500 Subject: [PATCH 1/5] Add Rustup instructions --- .../getting-started/hello-world.mdx | 47 ++++--------------- .../developer-journey/level-0/03-dev-env.mdx | 9 ++++ 2 files changed, 18 insertions(+), 38 deletions(-) diff --git a/docs/developer-docs/getting-started/hello-world.mdx b/docs/developer-docs/getting-started/hello-world.mdx index 449ee188f4..27f5ce7cb5 100644 --- a/docs/developer-docs/getting-started/hello-world.mdx +++ b/docs/developer-docs/getting-started/hello-world.mdx @@ -71,9 +71,14 @@ Download and install the latest version of [dfx](install/index.mdx). `dfx` is a sh -ci "$(curl -fsSL https://internetcomputer.org/install.sh)" ``` -:::info -For Kybra projects, you will need to install `dfx` version `0.19.0` or newer, and you must run all `dfx` commands in a Python virtual environment. -::: +### Install `wasm32-unknown-unknown` + +ICP smart contracts are compiled into WebAssembly modules. To support this compilation, install the `wasm32-unknown-unknown` package: + +``` +cargo build +rustup target add wasm32-unknown-unknown +``` ### Install [Node.js](https://nodejs.org/en/download) @@ -231,41 +236,7 @@ export default class { }> -Python canisters can be written using the Kybra canister development kit. - -To set up a Python virtual environment, use the following commands: - - - -``` -curl https://pyenv.run | bash -~/.pyenv/bin/pyenv install 3.10.7 -~/.pyenv/versions/3.10.7/bin/python -m venv venv -source venv/bin/activate -pip install kybra -``` - - - -``` -brew install pyenv -export PYENV_ROOT="$HOME/.pyenv" -[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH" -eval "$(pyenv init -)" -source ~/.zprofile -pyenv install 3.10.7 -~/.pyenv/versions/3.10.7/bin/python -m venv venv -source venv/bin/activate -pip install kybra -``` - - - - -Kybra is not currently supported on Windows. - - - +Python canisters can be written using the Kybra canister development kit. [Learn more about setting up Kybra](/docs/current/developer-docs/backend/python/). The default canister code for Kybra projects contains the following: diff --git a/docs/tutorials/developer-journey/level-0/03-dev-env.mdx b/docs/tutorials/developer-journey/level-0/03-dev-env.mdx index 54936a0710..4394302ccd 100644 --- a/docs/tutorials/developer-journey/level-0/03-dev-env.mdx +++ b/docs/tutorials/developer-journey/level-0/03-dev-env.mdx @@ -69,6 +69,15 @@ The IC SDK is composed of several components that are required for developing on - `moc`: The Motoko runtime compiler. - `replica`: The Internet Computer's local network binary. +### Install `wasm32-unknown-unknown` + +ICP smart contracts are compiled into WebAssembly modules. To support this compilation, install the `wasm32-unknown-unknown` package: + +``` +cargo build +rustup target add wasm32-unknown-unknown +``` + ### Download and install a code editor To write and edit code, you will need a code editor. macOS and Linux systems come with some basic editors, such as `vi` or `nano`, but these have very limited functionality and can be hard to use. From 5aa9f128573637c01cb1c8a4485a7e39060b6ddf Mon Sep 17 00:00:00 2001 From: Jessie Mongeon Date: Wed, 11 Sep 2024 11:14:15 -0500 Subject: [PATCH 2/5] Revise per feedback --- docs/developer-docs/getting-started/hello-world.mdx | 13 ++++++++++--- .../developer-journey/level-0/03-dev-env.mdx | 13 ++++++++++--- submodules/internetidentity | 2 +- submodules/motoko | 2 +- submodules/response-verfication | 2 +- submodules/samples | 2 +- submodules/sdk | 2 +- 7 files changed, 25 insertions(+), 11 deletions(-) diff --git a/docs/developer-docs/getting-started/hello-world.mdx b/docs/developer-docs/getting-started/hello-world.mdx index 27f5ce7cb5..fa9a1326bf 100644 --- a/docs/developer-docs/getting-started/hello-world.mdx +++ b/docs/developer-docs/getting-started/hello-world.mdx @@ -71,12 +71,19 @@ Download and install the latest version of [dfx](install/index.mdx). `dfx` is a sh -ci "$(curl -fsSL https://internetcomputer.org/install.sh)" ``` -### Install `wasm32-unknown-unknown` +### Install Rust -ICP smart contracts are compiled into WebAssembly modules. To support this compilation, install the `wasm32-unknown-unknown` package: +To compile and deploy projects, `dfx` uses Rust on the backend. You will need to install Rust in your environment with the command: + +``` +curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh +``` + +### Install `wasm32-unknown-unknown` target + +ICP smart contracts are compiled into WebAssembly modules. To support this compilation, install the `wasm32-unknown-unknown` target: ``` -cargo build rustup target add wasm32-unknown-unknown ``` diff --git a/docs/tutorials/developer-journey/level-0/03-dev-env.mdx b/docs/tutorials/developer-journey/level-0/03-dev-env.mdx index 4394302ccd..a7cba2f0e0 100644 --- a/docs/tutorials/developer-journey/level-0/03-dev-env.mdx +++ b/docs/tutorials/developer-journey/level-0/03-dev-env.mdx @@ -69,12 +69,19 @@ The IC SDK is composed of several components that are required for developing on - `moc`: The Motoko runtime compiler. - `replica`: The Internet Computer's local network binary. -### Install `wasm32-unknown-unknown` +### Install Rust -ICP smart contracts are compiled into WebAssembly modules. To support this compilation, install the `wasm32-unknown-unknown` package: +To compile and deploy projects, `dfx` uses Rust on the backend. You will need to install Rust in your environment with the command: + +``` +curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh +``` + +### Install `wasm32-unknown-unknown` target + +ICP smart contracts are compiled into WebAssembly modules. To support this compilation, install the `wasm32-unknown-unknown` target: ``` -cargo build rustup target add wasm32-unknown-unknown ``` diff --git a/submodules/internetidentity b/submodules/internetidentity index f8eaa539fb..edd4b57148 160000 --- a/submodules/internetidentity +++ b/submodules/internetidentity @@ -1 +1 @@ -Subproject commit f8eaa539fba2363d4b87ca42c82227aa74f075d3 +Subproject commit edd4b57148ce2587cf2d1f6df48e6e85e968c9a9 diff --git a/submodules/motoko b/submodules/motoko index de582b3aec..983c988ef5 160000 --- a/submodules/motoko +++ b/submodules/motoko @@ -1 +1 @@ -Subproject commit de582b3aecf4d475d4603c620bdca83540d42889 +Subproject commit 983c988ef5add870f2d05043c41d9ed69df7ecb7 diff --git a/submodules/response-verfication b/submodules/response-verfication index da70db9383..846f899eff 160000 --- a/submodules/response-verfication +++ b/submodules/response-verfication @@ -1 +1 @@ -Subproject commit da70db93832f88ecc556ae082612aedec47d3816 +Subproject commit 846f899eff5c2653387134fab1657faaf01a5175 diff --git a/submodules/samples b/submodules/samples index 152edd0025..24aca5b979 160000 --- a/submodules/samples +++ b/submodules/samples @@ -1 +1 @@ -Subproject commit 152edd00251b46db3d962e5af5d7e3d5ce3c2350 +Subproject commit 24aca5b979fd7f3690ee31890b466c19f45a027d diff --git a/submodules/sdk b/submodules/sdk index e6942eb450..a6ff300c39 160000 --- a/submodules/sdk +++ b/submodules/sdk @@ -1 +1 @@ -Subproject commit e6942eb4508ebec140efbf2def0466ee8f5e1fc0 +Subproject commit a6ff300c392661741ab01c997100ac80fea8d3a6 From b01cfab7a94481ee2324fd7c6e2b40214a984821 Mon Sep 17 00:00:00 2001 From: Jessie Mongeon Date: Wed, 11 Sep 2024 11:21:51 -0500 Subject: [PATCH 3/5] Revise per feedback --- .../getting-started/hello-world.mdx | 32 +++++++++---------- .../developer-journey/level-0/03-dev-env.mdx | 16 ---------- 2 files changed, 16 insertions(+), 32 deletions(-) diff --git a/docs/developer-docs/getting-started/hello-world.mdx b/docs/developer-docs/getting-started/hello-world.mdx index fa9a1326bf..5c3dc1c94e 100644 --- a/docs/developer-docs/getting-started/hello-world.mdx +++ b/docs/developer-docs/getting-started/hello-world.mdx @@ -71,22 +71,6 @@ Download and install the latest version of [dfx](install/index.mdx). `dfx` is a sh -ci "$(curl -fsSL https://internetcomputer.org/install.sh)" ``` -### Install Rust - -To compile and deploy projects, `dfx` uses Rust on the backend. You will need to install Rust in your environment with the command: - -``` -curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -``` - -### Install `wasm32-unknown-unknown` target - -ICP smart contracts are compiled into WebAssembly modules. To support this compilation, install the `wasm32-unknown-unknown` target: - -``` -rustup target add wasm32-unknown-unknown -``` - ### Install [Node.js](https://nodejs.org/en/download) ```bash @@ -198,6 +182,22 @@ actor { +### Install Rust + +You will need to install Rust in your environment with the command: + +``` +curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh +``` + +### Install `wasm32-unknown-unknown` target + +ICP smart contracts are compiled into WebAssembly modules. To support this compilation, install the `wasm32-unknown-unknown` target: + +``` +rustup target add wasm32-unknown-unknown +``` + This Rust smart contract has a single function called greet. It is marked as query because it doesn't modify the state of the canister. The function accepts a name as input and returns a greetings text. diff --git a/docs/tutorials/developer-journey/level-0/03-dev-env.mdx b/docs/tutorials/developer-journey/level-0/03-dev-env.mdx index a7cba2f0e0..54936a0710 100644 --- a/docs/tutorials/developer-journey/level-0/03-dev-env.mdx +++ b/docs/tutorials/developer-journey/level-0/03-dev-env.mdx @@ -69,22 +69,6 @@ The IC SDK is composed of several components that are required for developing on - `moc`: The Motoko runtime compiler. - `replica`: The Internet Computer's local network binary. -### Install Rust - -To compile and deploy projects, `dfx` uses Rust on the backend. You will need to install Rust in your environment with the command: - -``` -curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -``` - -### Install `wasm32-unknown-unknown` target - -ICP smart contracts are compiled into WebAssembly modules. To support this compilation, install the `wasm32-unknown-unknown` target: - -``` -rustup target add wasm32-unknown-unknown -``` - ### Download and install a code editor To write and edit code, you will need a code editor. macOS and Linux systems come with some basic editors, such as `vi` or `nano`, but these have very limited functionality and can be hard to use. From 9bbbbd479bee9b7ceb6fe9981086ba4ca57c8fbf Mon Sep 17 00:00:00 2001 From: Jessie Mongeon <133128541+jessiemongeon1@users.noreply.github.com> Date: Wed, 11 Sep 2024 14:03:06 -0500 Subject: [PATCH 4/5] Update hello-world.mdx --- docs/developer-docs/getting-started/hello-world.mdx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/developer-docs/getting-started/hello-world.mdx b/docs/developer-docs/getting-started/hello-world.mdx index 5c3dc1c94e..227a746f21 100644 --- a/docs/developer-docs/getting-started/hello-world.mdx +++ b/docs/developer-docs/getting-started/hello-world.mdx @@ -87,9 +87,10 @@ dfx start This command starts a local instance of the ICP replica using a single node testnet. The output will return a dashboard URL that can be used to view information about the local replica: ``` -Running dfx start for version 0.15.2 +Using the default configuration for the local shared network. Initialized replica. -Dashboard: http://localhost:35375/_/dashboard +Initialized HTTP gateway. +Replica API running on 127.0.0.1:4943 ``` :::info From f49bb73668ea031b7f030b86d7a0fa1e56337e1e Mon Sep 17 00:00:00 2001 From: Jessie Mongeon Date: Thu, 12 Sep 2024 09:37:31 -0500 Subject: [PATCH 5/5] fix subs --- submodules/internetidentity | 2 +- submodules/motoko | 2 +- submodules/response-verfication | 2 +- submodules/samples | 2 +- submodules/sdk | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/submodules/internetidentity b/submodules/internetidentity index edd4b57148..f8eaa539fb 160000 --- a/submodules/internetidentity +++ b/submodules/internetidentity @@ -1 +1 @@ -Subproject commit edd4b57148ce2587cf2d1f6df48e6e85e968c9a9 +Subproject commit f8eaa539fba2363d4b87ca42c82227aa74f075d3 diff --git a/submodules/motoko b/submodules/motoko index 983c988ef5..de582b3aec 160000 --- a/submodules/motoko +++ b/submodules/motoko @@ -1 +1 @@ -Subproject commit 983c988ef5add870f2d05043c41d9ed69df7ecb7 +Subproject commit de582b3aecf4d475d4603c620bdca83540d42889 diff --git a/submodules/response-verfication b/submodules/response-verfication index 846f899eff..da70db9383 160000 --- a/submodules/response-verfication +++ b/submodules/response-verfication @@ -1 +1 @@ -Subproject commit 846f899eff5c2653387134fab1657faaf01a5175 +Subproject commit da70db93832f88ecc556ae082612aedec47d3816 diff --git a/submodules/samples b/submodules/samples index 24aca5b979..152edd0025 160000 --- a/submodules/samples +++ b/submodules/samples @@ -1 +1 @@ -Subproject commit 24aca5b979fd7f3690ee31890b466c19f45a027d +Subproject commit 152edd00251b46db3d962e5af5d7e3d5ce3c2350 diff --git a/submodules/sdk b/submodules/sdk index a6ff300c39..e6942eb450 160000 --- a/submodules/sdk +++ b/submodules/sdk @@ -1 +1 @@ -Subproject commit a6ff300c392661741ab01c997100ac80fea8d3a6 +Subproject commit e6942eb4508ebec140efbf2def0466ee8f5e1fc0