Skip to content

Commit

Permalink
Merge pull request #3443 from dfinity/large-wasm
Browse files Browse the repository at this point in the history
move: Installing large Wasm
  • Loading branch information
jessiemongeon1 authored Sep 10, 2024
2 parents c993ef0 + a43e13a commit 31bc55c
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 27 deletions.
25 changes: 0 additions & 25 deletions docs/developer-docs/smart-contracts/deploy/larger-wasm.mdx

This file was deleted.

13 changes: 13 additions & 0 deletions docs/developer-docs/smart-contracts/install.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 2 additions & 1 deletion plugins/utils/redirects.js
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ const redirects = `
/docs/current/developer-docs/backend/candid/candid-howto /docs/current/developer-docs/smart-contracts/candid/candid-howto
/docs/current/developer-docs/backend/candid/generating-candid /docs/current/developer-docs/backend/rust/generating-candid
/docs/current/developer-docs/setup/deploy /docs/current/developer-docs/smart-contracts/deploy/overview
/docs/current/developer-docs/production/larger-wasm /docs/current/developer-docs/smart-contracts/deploy/larger-wasm
/docs/current/developer-docs/production/larger-wasm /docs/current/developer-docs/smart-contracts/install
/docs/current/developer-docs/production/social-sharing /docs/current/developer-docs/smart-contracts/deploy/overview
/docs/current/developer-docs/setup/delete /docs/current/developer-docs/smart-contracts/maintain/delete
/docs/current/developer-docs/production/canister-history /docs/current/developer-docs/smart-contracts/maintain/history
Expand Down Expand Up @@ -595,6 +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
/docs/current/developer-docs/smart-contracts/deploy/sharing /docs/current/developer-docs/smart-contracts/deploy/overview
`
.split(/[\r\n]+/)
Expand Down
1 change: 0 additions & 1 deletion sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ const sidebars = {
id: "developer-docs/smart-contracts/deploy/overview",
},
"developer-docs/smart-contracts/deploy/custom-testnets",
"developer-docs/smart-contracts/deploy/larger-wasm",
],
},
{
Expand Down

0 comments on commit 31bc55c

Please sign in to comment.