diff --git a/docs/developer-docs/smart-contracts/deploy/larger-wasm.mdx b/docs/developer-docs/smart-contracts/deploy/larger-wasm.mdx deleted file mode 100644 index 2f88184d78..0000000000 --- a/docs/developer-docs/smart-contracts/deploy/larger-wasm.mdx +++ /dev/null @@ -1,25 +0,0 @@ ---- -keywords: [large wasm, intermediate, tutorial] ---- - -import { MarkdownChipRow } from "/src/components/Chip/MarkdownChipRow"; - -# Large web assembly modules - - - -## Overview - -The size of programs that can be installed on ICP is currently limited to 2MB. -WebAssembly modules that are (slightly) larger than 2MB can still be installed on ICP by using gzip file compression before uploading; ICP will then decompress the file and install the contained WebAssembly module. - -## Installing a gzip-compressed WebAssembly module - -The WebAssembly module is compressed using `gzip` and then uploaded by `dfx install`, you may need to add `--mode reinstall` or `--mode upgrade` when uploading the module to an existing canister. - -``` bash -gzip my-canister.wasm -dfx canister install my-canister --wasm my-canister.wasm.gz -``` - -Compression is currently not supported by `dfx deploy`. diff --git a/docs/developer-docs/smart-contracts/install.mdx b/docs/developer-docs/smart-contracts/install.mdx index a06abb3b9b..8ef496b831 100644 --- a/docs/developer-docs/smart-contracts/install.mdx +++ b/docs/developer-docs/smart-contracts/install.mdx @@ -37,6 +37,19 @@ Creating a canister on the mainnet will cost [cycles](/docs/current/developer-do At this step, settings can be configured for the canister using the optional flags. [View the full list of settings that can be configured](/docs/current/developer-docs/developer-tools/cli-tools/cli-reference/dfx-canister#options-1). +## Installing a gzip-compressed WebAssembly module + +The size of programs that can be installed on ICP is currently limited to 2 MiB. +WebAssembly modules that are (slightly) larger than 2 MiB can still be installed on ICP by using gzip file compression before uploading; ICP will then decompress the file and install the contained WebAssembly module. + +The WebAssembly module is compressed using `gzip` and then uploaded by `dfx install`, you may need to add `--mode reinstall` or `--mode upgrade` when uploading the module to an existing canister. + +``` bash +gzip my-canister.wasm +dfx canister install my-canister --wasm my-canister.wasm.gz +``` + +Compression is currently not supported by `dfx deploy`. ## Troubleshooting diff --git a/plugins/utils/redirects.js b/plugins/utils/redirects.js index c2b2f32461..8905500ecb 100644 --- a/plugins/utils/redirects.js +++ b/plugins/utils/redirects.js @@ -595,7 +595,7 @@ const redirects = ` /docs/current/developer-docs/getting-started/ /docs/current/developer-docs/getting-started/overview-of-icp /docs/current/developer-docs/defi/wallets/workflow /docs/current/developer-docs/defi/wallets/overview /docs/current/developer-docs/backend/rust/infrastructure /docs/current/developer-docs/backend/rust/ - + /docs/current/developer-docs/smart-contracts/deploy/larger-wasm /docs/current/developer-docs/smart-contracts/install ` .split(/[\r\n]+/) .map((line) => line.trim().replace(/^#.*$/, "").trim())