Skip to content

Commit

Permalink
Update optimized page (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
leighmcculloch authored Jul 29, 2022
1 parent a2427c8 commit 38f6f78
Showing 1 changed file with 14 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,20 +1,28 @@
---
sidebar_position: 8
title: Build an Optimized WASM File
title: Build Optimized
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

Building optimized WASM files requires some additional options and commands, and
requires installing the `nightly` Rust toolchain and `wasm-opt`.
Building optimized contracts to be as small as possible requires some additional
tools, and requires installing the `nightly` Rust toolchain and `wasm-opt`.

:::info
Building optimized WASM is only necessary when deploying to network or when
analyzing the real size of a contract. It is otherwise not required during
initial development.
Building optimized contracts is only necessary when deploying to network or when
analyzing and profiling a contract to get it as small as possible. If you're
just starting out writing a contract, these steps are not necessary.
:::

:::info
All contracts are optimized to some degree by the projects `release` profile.
It is highly recommended to use the release profile outlined in [Configure the
Release Profile], otherwise the contract will be too large to deploy or run.
:::

[Create a Project]: create-a-project#configure-the-release-profile

## Install Rust `nightly`

To install the nightly Rust toolchain use `rustup`.
Expand Down

0 comments on commit 38f6f78

Please sign in to comment.