Skip to content

Commit

Permalink
Sylvia tutorial first messages review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jawoznia committed Jan 7, 2025
1 parent 67ab1f4 commit 82f9411
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/pages/tutorial/setup-environment.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
1 change: 1 addition & 0 deletions src/pages/tutorial/sylvia-contract/_meta.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"contract-creation": "Contract creation",
"entry-points": "Entry points",
"first-messages": "First messages"
}
4 changes: 2 additions & 2 deletions src/pages/tutorial/sylvia-contract/contract-creation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -48,7 +48,7 @@ sylvia = "1.3.1"
[documentation](https://docs.rs/sylvia/latest/sylvia/#reexports).
</Callout>

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
Expand Down

0 comments on commit 82f9411

Please sign in to comment.