Skip to content

Fix some config.toml documentation #276

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/pages/sylvia/basics/generate-contract.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ way you want.
- `src/multitest/` - module in which we define our tests. It's a good practice to separate the tests
between files semantically.
- `src/bin/schema.rs` - builds into a binary which generates the contract schema.
- `.cargo/config` - exposes some aliases to make working with the project simpler.
- `.cargo/config.toml` - exposes some aliases to make working with the project simpler.
- `cargo wasm` - run `cargo build` with additional options to compile a proper _wasm_ binary.
- `cargo wasm-debug` - same as `cargo wasm`, but without `--release` profile to provide more
debugging symbols.
- `cargo schema` - builds and runs the `src/schema.rs` for simpler schema generation.
- `cargo wasm-debug` - same as `cargo wasm`, but without `--release` profile to speed up build
times a lot and provide debugging symbols.
- `cargo schema` - builds and runs the `src/bin/schema.rs` for simpler schema generation.
5 changes: 2 additions & 3 deletions src/pages/tutorial/cw-contract/building-contract.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,8 @@ wasm = "build --target wasm32-unknown-unknown --release"
wasm-debug = "build --target wasm32-unknown-unknown"
```

Now, building your Wasm binary is as easy as executing `cargo wasm`. We also added the additional
`wasm-debug` command for rare cases when we want to build the wasm binary, including debug
information.
Now, building your Wasm binary is as easy as executing `cargo wasm`. We also added the `wasm-debug`
command for faster test builds and rare cases when we want to include debug information in the Wasm.

## Checking contract validity

Expand Down
4 changes: 2 additions & 2 deletions src/pages/tutorial/cw-contract/good-practices.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -280,13 +280,13 @@ I encourage you to go to the generated file to see what the schema looks like.

The problem is that, unfortunately, creating this binary makes our project fail to compile on the
Wasm target - which is, in the end, the most important one. Fortunately, we don't need to build the
schema binary for the Wasm target - let's align the `.cargo/config` file:
schema binary for the Wasm target - let's align the `.cargo/config.toml` file:

```toml
[alias]
wasm = "build --target wasm32-unknown-unknown --release --lib"
wasm-debug = "build --target wasm32-unknown-unknown --lib"
schema = "run schema"
schema = "run --bin schema"
```

The `--lib` flag added to `wasm` cargo aliases tells the toolchain to build only the library
Expand Down
Loading