From 82f94115dba23b357850d51cb8a34ec550eb1304 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Wo=C5=BAniak?= Date: Tue, 7 Jan 2025 15:09:55 +0100 Subject: [PATCH] Sylvia tutorial first messages review fixes --- src/pages/tutorial/setup-environment.mdx | 6 +++--- src/pages/tutorial/sylvia-contract/_meta.json | 1 + src/pages/tutorial/sylvia-contract/contract-creation.mdx | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/pages/tutorial/setup-environment.mdx b/src/pages/tutorial/setup-environment.mdx index 95d1f6d6..f39af6e9 100644 --- a/src/pages/tutorial/setup-environment.mdx +++ b/src/pages/tutorial/setup-environment.mdx @@ -94,9 +94,9 @@ All contracts (1) passed checks! ## Macro expansion -In VSCode you can hover over a macro like [`#[contract]`](../sylvia/macros/contract), do `shift+p` -and then type: `rust analyzer: Expand macro recursively`. This will open a window with a fully -expanded macro, which you can browse. In Vim you can consider installing the +In VSCode you can hover over a macro like [`#[contract]`](../sylvia/macros/contract), press +`shift+p` and then type: `rust analyzer: Expand macro recursively`. This will open a window with a +fully expanded macro, which you can browse. In Vim you can consider installing the [rustaceanvim](https://github.com/mrcjkb/rustaceanvim) plugin. You can also use `cargo expand` tool from CLI, like this: diff --git a/src/pages/tutorial/sylvia-contract/_meta.json b/src/pages/tutorial/sylvia-contract/_meta.json index 8ce646e7..2d82bb42 100644 --- a/src/pages/tutorial/sylvia-contract/_meta.json +++ b/src/pages/tutorial/sylvia-contract/_meta.json @@ -1,4 +1,5 @@ { "contract-creation": "Contract creation", + "entry-points": "Entry points", "first-messages": "First messages" } diff --git a/src/pages/tutorial/sylvia-contract/contract-creation.mdx b/src/pages/tutorial/sylvia-contract/contract-creation.mdx index 9e89ff86..de9f9259 100644 --- a/src/pages/tutorial/sylvia-contract/contract-creation.mdx +++ b/src/pages/tutorial/sylvia-contract/contract-creation.mdx @@ -16,7 +16,7 @@ cargo generate CosmWasm/sylvia-template The [`sylvia-template`](https://github.com/CosmWasm/sylvia-template) will generate a lot of code for you. Because this tutorial aims to guide you step-by-step through the process of creating your first -contract we will omit the use of the template and show you how to create it from the start. +contract we will omit the use of the template and show you how to create it from the scratch. ## New project @@ -48,7 +48,7 @@ sylvia = "1.3.1" [documentation](https://docs.rs/sylvia/latest/sylvia/#reexports). -As you can see, I added a `crate-type` field for the library section. Generating the +As you can see, we added a `crate-type` field for the library section. Generating the [`cdylib`](https://doc.rust-lang.org/reference/linkage.html) is required to create a proper web assembly binary. The downside of this is that such a library cannot be used as a dependency for other Rust crates - for now, it is not needed, but later we will show how to approach reusing