Skip to content

Commit

Permalink
Merge pull request #3364 from dfinity/jessiemongeon1-patch-3
Browse files Browse the repository at this point in the history
fix: Rust docs typos
  • Loading branch information
jessiemongeon1 authored Aug 15, 2024
2 parents 1d86c89 + b08b55c commit b8e0b25
Showing 1 changed file with 5 additions and 19 deletions.
24 changes: 5 additions & 19 deletions docs/developer-docs/backend/rust/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,12 @@ import { MarkdownChipRow } from "/src/components/Chip/MarkdownChipRow";
Rust is a powerful and type-sound modern programming language with an active developer community. Because Rust compiles to WebAssembly, it offers a rich development environment for writing dapps to run on the Internet Computer blockchain.

## Overview
To help pave the way for writing dapps in Rust that can be deployed on the Internet Computer blockchain, you can use the [IC SDK](/docs/current/developer-docs/getting-started/install/). The IC SDK supports the Rust as well as the Motoko programming language. To create a Rust project using the IC SDK, all one needs to do is add the `--type=rust` flag while creating a new project. For example, here you create a Rust project named `hello_world`:
To help pave the way for writing dapps in Rust that can be deployed on ICP, you can use the [IC SDK](/docs/current/developer-docs/getting-started/install/). To create a Rust project using the IC SDK, all you need to do is add the `--type=rust` flag while creating a new project. For example, to create a Rust project named `hello_world`, use the command:

```
dfx new hello_world
dfx new hello_world --type=rust
```

You will be prompted to select the language that your backend canister will use. Select 'Rust':

```
? Select a backend language: ›
Motoko
❯ Rust
TypeScript (Azle)
Python (Kybra)
```

:::info
`dfx` versions `v0.17.0` and newer support this `dfx new` interactive prompt. [Learn more about `dfx v0.17.0`](/blog/2024/02/14/news-and-updates/update#dfx-v0170).
:::

For more information on starting a new project see [Rust quick start](4-quickstart.mdx).

## Architecture
Expand All @@ -40,11 +26,11 @@ To support Rust development, the IC SDK includes the [Rust canister development
**While using the IC SDK is the typical path for most developers, experienced Rust developers may choose to circumvent IC SDK entirely and use the [Rust CDK](https://github.com/dfinity/cdk-rs) directly. This documentation assumes one is using the IC SDK to build Rust canisters.**

### The Rust CDK consists of the following crates:
- The core of Rust CDK is the [`ic-cdk`](https://crates.io/crates/ic-cdk) crate. It provides the core methods that enable Rust programs to interact with the Internet Computer blockchain system API.
- The core of Rust CDK is the [`ic-cdk`](https://crates.io/crates/ic-cdk) crate. It provides the core methods that enable Rust programs to interact with the ICP system API.

- The [`ic-cdk-macros`](https://crates.io/crates/ic-cdk-macros) crate defines the procedural macros (e.g. `update`, `query`, `import`) that facilitate building operation endpoints and APIs.

- Also, the [`ic-cdk-timers`](https://crates.io/crates/ic-cdk-timers) crate provides an API to schedule multiple and periodic tasks.
- The [`ic-cdk-timers`](https://crates.io/crates/ic-cdk-timers) crate provides an API to schedule multiple timers and periodic tasks.

There are a few [examples](https://github.com/dfinity/cdk-rs/tree/main/examples) to get you started building Rust Canisters.
There are a few [examples](https://github.com/dfinity/cdk-rs/tree/main/examples) to get you started building Rust canisters.

0 comments on commit b8e0b25

Please sign in to comment.