# \#Wasm

**URL:** https://forum.dfinity.org/tag/wasm/4.md

[Latest](https://forum.dfinity.org/latest.md) · [Categories](https://forum.dfinity.org/categories.md) · [Tags](https://forum.dfinity.org/tags.md)

---

## [Frontend Canister Upgrade Fails with 'malformed\_request'](https://forum.dfinity.org/t/frontend-canister-upgrade-fails-with-malformed-request/49257)

<div class="topic-metadata">

**Author:** [@Nimakra](https://forum.dfinity.org/u/Nimakra)\
**Replies:** 2\
**Last updated:** [June 5, 2025, 4:21pm UTC](https://forum.dfinity.org/t/frontend-canister-upgrade-fails-with-malformed-request/49257 "2025-06-05T16:21:54Z")

</div>

Hello everyone, I have a React + Vite frontend already deployed to the mainnet. My build output is in dist/. The assets folder in dist/assets contains all of my app’s compiled JS files. This folder is about 2.9MB in tota…

---

## [Generating a candid file after compiling code as wasm32-wasi gives an error](https://forum.dfinity.org/t/generating-a-candid-file-after-compiling-code-as-wasm32-wasi-gives-an-error/39249)

<div class="topic-metadata">

**Author:** [@ydr990318](https://forum.dfinity.org/u/ydr990318)\
**Replies:** 2\
**Last updated:** [December 23, 2024, 5:03pm UTC](https://forum.dfinity.org/t/generating-a-candid-file-after-compiling-code-as-wasm32-wasi-gives-an-error/39249 "2024-12-23T17:03:37Z")

</div>

Hey~ @jeshli , sorry to bother you again, I’ve successfully run your rust-connect-py-ai-to-ic project, but since I didn’t have a tokenizer for transcoding, I created a new canister, but the transcoding has to be done wit…

---

## [Wasm is too large](https://forum.dfinity.org/t/wasm-is-too-large/38865)

<div class="topic-metadata">

**Author:** [@ydr990318](https://forum.dfinity.org/u/ydr990318)\
**Replies:** 2\
**Last updated:** [December 14, 2024, 4:35pm UTC](https://forum.dfinity.org/t/wasm-is-too-large/38865 "2024-12-14T16:35:32Z")

</div>

Guys, got a problem here: while I was deploying my canister, it occured: Canister's Wasm module is not valid: Wasm module code section size of 11914096 exceeds the maximum allowed size of 10485760., error code None, even…

---

## [Orthogonal Persistence of C++ Data Structures on the Internet Computer: A Study](https://forum.dfinity.org/t/orthogonal-persistence-of-c-data-structures-on-the-internet-computer-a-study/21828)

<div class="topic-metadata">

**Author:** [@icpp](https://forum.dfinity.org/u/icpp)\
**Replies:** 17\
**Last updated:** [July 20, 2024, 4:07pm UTC](https://forum.dfinity.org/t/orthogonal-persistence-of-c-data-structures-on-the-internet-computer-a-study/21828 "2024-07-20T16:07:25Z")

</div>

Hello C++ developers, I’ve been experimenting with orthogonal persistence of various C++ data structures in canisters on the Internet Computer (IC) and would like to share my findings with the community. TL;DR It work…

---

## [I have a problem when using Math.random() from JS](https://forum.dfinity.org/t/i-have-a-problem-when-using-math-random-from-js/31784)

<div class="topic-metadata">

**Author:** [@mrZedov](https://forum.dfinity.org/u/mrZedov)\
**Replies:** 5\
**Last updated:** [July 17, 2024, 1:39pm UTC](https://forum.dfinity.org/t/i-have-a-problem-when-using-math-random-from-js/31784 "2024-07-17T13:39:49Z")

</div>

I’m seeing some interesting behavior in the canister. Always the same Math.random() number when calling “http\_request” using the CURL request (from Postman). However, this only works correctly when calling “readRecord” u…

---

## [Dfx 0.16: Wasm module is too large](https://forum.dfinity.org/t/dfx-0-16-wasm-module-is-too-large/27136)

<div class="topic-metadata">

**Author:** [@Gabriel](https://forum.dfinity.org/u/Gabriel)\
**Replies:** 4\
**Last updated:** [February 1, 2024, 1:30pm UTC](https://forum.dfinity.org/t/dfx-0-16-wasm-module-is-too-large/27136 "2024-02-01T13:30:44Z")

</div>

Hi, We recently upgraded some our wasm to include other canisters with the new dfx version 0.16. All is good except the unzipped wasm is 39.9 MB (41,866,288 bytes) and on install we get this error: Error: Failed to i…

---

## [Imposible to convert undefined to principal when trying to call a canister from backend](https://forum.dfinity.org/t/imposible-to-convert-undefined-to-principal-when-trying-to-call-a-canister-from-backend/24714)

<div class="topic-metadata">

**Author:** [@Ishmael-Chepsoi](https://forum.dfinity.org/u/Ishmael-Chepsoi)\
**Replies:** 1\
**Last updated:** [November 16, 2023, 4:30pm UTC](https://forum.dfinity.org/t/imposible-to-convert-undefined-to-principal-when-trying-to-call-a-canister-from-backend/24714 "2023-11-16T16:30:35Z")

</div>

here is my backend functional call: public query func getAllParties() : async \[Text\] { let parties = Iter.toArray(mapOfPartyListing.keys()); return parties; }; Have imported this canister to the frontend as …

---

## [Ledger-transfer demo cannot be deployed](https://forum.dfinity.org/t/ledger-transfer-demo-cannot-be-deployed/21423)

<div class="topic-metadata">

**Author:** [@haida](https://forum.dfinity.org/u/haida)\
**Replies:** 9\
**Last updated:** [July 19, 2023, 6:44am UTC](https://forum.dfinity.org/t/ledger-transfer-demo-cannot-be-deployed/21423 "2023-07-19T06:44:29Z")

</div>

export IC\_VERSION=dd3a710b03bd3ae10368a91b255571d012d1ec2f curl -o ledger.wasm.gz "https://download.dfinity.systems/ic/$IC\_VERSION/canisters/ledger-canister\_notify-method.wasm.gz" gunzip ledger.wasm.gz curl -o ledger.p…

---

## [Full-Text Search](https://forum.dfinity.org/t/full-text-search/11382)

<div class="topic-metadata">

**Author:** [@Motokoder](https://forum.dfinity.org/u/Motokoder)\
**Replies:** 10\
**Last updated:** [June 29, 2023, 10:38am UTC](https://forum.dfinity.org/t/full-text-search/11382 "2023-06-29T10:38:43Z")

</div>

I am in need of a Motoko library for efficiently indexing large content with minimal index storage for fast and flexible full-text search. I haven’t found such a project and I know better than to tackle this challenge fr…

---

## [Dev-dependencies make \[Wasm module has an invalid import section\] happen](https://forum.dfinity.org/t/dev-dependencies-make-wasm-module-has-an-invalid-import-section-happen/20103)

<div class="topic-metadata">

**Author:** [@witter](https://forum.dfinity.org/u/witter)\
**Replies:** 2\
**Last updated:** [May 20, 2023, 7:42am UTC](https://forum.dfinity.org/t/dev-dependencies-make-wasm-module-has-an-invalid-import-section-happen/20103 "2023-05-20T07:42:04Z")

</div>

Problem: I am using Rust for container development, and dev-dependencies in Cargo.toml are only used for unit testing, but when the package references in dev-dependencies come in, it will cause an error in dfx deploy: F…

---

## [32 GB Canister Storage](https://forum.dfinity.org/t/32-gb-canister-storage/16452)

<div class="topic-metadata">

**Author:** [@gladguy](https://forum.dfinity.org/u/gladguy)\
**Replies:** 5\
**Last updated:** [November 9, 2022, 9:18pm UTC](https://forum.dfinity.org/t/32-gb-canister-storage/16452 "2022-11-09T21:18:03Z")

</div>

Hey there, Wondering about the 32 GB Storage in canister? How to deploy a canister with 32 GB enabled ? Thanks in Advance

---

## [Has anyone used the Yew framework as Frontend?](https://forum.dfinity.org/t/has-anyone-used-the-yew-framework-as-frontend/15978)

<div class="topic-metadata">

**Author:** [@tcrst](https://forum.dfinity.org/u/tcrst)\
**Replies:** 0\
**Last updated:** [October 19, 2022, 10:41am UTC](https://forum.dfinity.org/t/has-anyone-used-the-yew-framework-as-frontend/15978 "2022-10-19T10:41:37Z")

</div>

Hello, has anyone used the Rust Web Yew framework with IC ? It’s nice because you can have WASM modules at the frontend ( Yew ) and backend ( IC ), which personally I believe it’s the end of the road of web dev for ye…

---

## [Wen AssemblyScript CDK?](https://forum.dfinity.org/t/wen-assemblyscript-cdk/14844)

<div class="topic-metadata">

**Author:** [@Motokoder](https://forum.dfinity.org/u/Motokoder)\
**Replies:** 13\
**Last updated:** [August 13, 2022, 10:01pm UTC](https://forum.dfinity.org/t/wen-assemblyscript-cdk/14844 "2022-08-13T22:01:26Z")

</div>

I see that @rckprtr experimented with an AssemblyScript CDK: GitHub - rckprtr/cdk-as: Unofficial Experimental AssemblyScript CDK for DFINITY. Do others in the community want this to become a reality? Are there any curr…

---

## [Motoko as a general purpose language?](https://forum.dfinity.org/t/motoko-as-a-general-purpose-language/13341)

<div class="topic-metadata">

**Author:** [@coin\_master](https://forum.dfinity.org/u/coin_master)\
**Replies:** 1\
**Last updated:** [May 30, 2022, 9:29pm UTC](https://forum.dfinity.org/t/motoko-as-a-general-purpose-language/13341 "2022-05-30T21:29:25Z")

</div>

I have recently watched a talk about WebAssembly landscape in 2022. and Motoko was mentioned a specific language for Wasm along with AssemblyScript and Grain, both of them are a general purpose language th…

---

## [Should a 3000 line motoko file be \>3 MB WASM](https://forum.dfinity.org/t/should-a-3000-line-motoko-file-be-3-mb-wasm/12115)

<div class="topic-metadata">

**Author:** [@skilesare](https://forum.dfinity.org/u/skilesare)\
**Replies:** 10\
**Last updated:** [April 13, 2022, 6:28pm UTC](https://forum.dfinity.org/t/should-a-3000-line-motoko-file-be-3-mb-wasm/12115 "2022-04-13T18:28:42Z")

</div>

I have a big gnarly test canister that pretty much just runs locally. It’s parent cansister that references it and the instantiates it recently stopped deploying because: Error: The replica returned an HTTP Error: Http…

---

## [Does anyone know how to call the canisterupdate method with JS](https://forum.dfinity.org/t/does-anyone-know-how-to-call-the-canisterupdate-method-with-js/8259)

<div class="topic-metadata">

**Author:** [@0x000000000000000](https://forum.dfinity.org/u/0x000000000000000)\
**Replies:** 1\
**Last updated:** [November 1, 2021, 12:24pm UTC](https://forum.dfinity.org/t/does-anyone-know-how-to-call-the-canisterupdate-method-with-js/8259 "2021-11-01T12:24:21Z")

</div>

I don’t know how to call the canisterupdate method with JS. Can someone give me a template

---

## [How to get the args of IC.install\_code function?](https://forum.dfinity.org/t/how-to-get-the-args-of-ic-install-code-function/6553)

<div class="topic-metadata">

**Author:** [@C-B-Elite](https://forum.dfinity.org/u/C-B-Elite)\
**Replies:** 1\
**Last updated:** [August 18, 2021, 6:34pm UTC](https://forum.dfinity.org/t/how-to-get-the-args-of-ic-install-code-function/6553 "2021-08-18T18:34:10Z")

</div>

I’m trying to create and install code for canister by using IC Interface functions, but I’m blocked by the following problem: The code of IC.install\_code function is as follows: install\_code : shared { arg : \[Nat8\]…

---

## [How does the Hello starter project work? Files, paths, function call flow?](https://forum.dfinity.org/t/how-does-the-hello-starter-project-work-files-paths-function-call-flow/6355)

<div class="topic-metadata">

**Author:** [@shakespeare1212](https://forum.dfinity.org/u/shakespeare1212)\
**Replies:** 2\
**Last updated:** [August 9, 2021, 4:42pm UTC](https://forum.dfinity.org/t/how-does-the-hello-starter-project-work-files-paths-function-call-flow/6355 "2021-08-09T16:42:01Z")

</div>

Hello Dfiners, I got the hello project up and running with your kind help. Now I am trying to pick it apart, and several things are mystifying / blocking me. Also, I think I should post here several things that might h…

---

## [How to clone the canister?](https://forum.dfinity.org/t/how-to-clone-the-canister/5663)

<div class="topic-metadata">

**Author:** [@gladguy](https://forum.dfinity.org/u/gladguy)\
**Replies:** 1\
**Last updated:** [July 2, 2021, 7:24pm UTC](https://forum.dfinity.org/t/how-to-clone-the-canister/5663 "2021-07-02T19:24:16Z")

</div>

How to clone canisters? In the below architecture, as the new artists register i need to clone new canister for him How i can do that ?

---

## [Fileupload functionality](https://forum.dfinity.org/t/fileupload-functionality/5594)

<div class="topic-metadata">

**Author:** [@gladguy](https://forum.dfinity.org/u/gladguy)\
**Replies:** 5\
**Last updated:** [July 1, 2021, 4:07am UTC](https://forum.dfinity.org/t/fileupload-functionality/5594 "2021-07-01T04:07:24Z")

</div>

Wondering, about large file upload to canister. How we can achieve file uploading of size 4 MB ? Is there any tutorial or help available Appreciating much for your time and effort to reply to this thread Thanks a lot …

---

## [How do I deploy wasm file as canister](https://forum.dfinity.org/t/how-do-i-deploy-wasm-file-as-canister/5360)

<div class="topic-metadata">

**Author:** [@gladguy](https://forum.dfinity.org/u/gladguy)\
**Replies:** 4\
**Last updated:** [June 21, 2021, 5:22pm UTC](https://forum.dfinity.org/t/how-do-i-deploy-wasm-file-as-canister/5360 "2021-06-21T17:22:16Z")

</div>

I have a wasm file generated. Outside the dfx build and I want to create a canister using that wasm build is that possible ? Thanks

---

## [Compile Motoko to Wasm](https://forum.dfinity.org/t/compile-motoko-to-wasm/1183)

<div class="topic-metadata">

**Author:** [@extremety1989](https://forum.dfinity.org/u/extremety1989)\
**Replies:** 9\
**Last updated:** [November 19, 2020, 7:33pm UTC](https://forum.dfinity.org/t/compile-motoko-to-wasm/1183 "2020-11-19T19:33:15Z")

</div>

Is it possible to compile Motoko code directly to wasm file without conister ? like if i would compile c/c++ code to wasm and call it from nodejs or other languages ?

---

## [Help with Candid File construction](https://forum.dfinity.org/t/help-with-candid-file-construction/1160)

<div class="topic-metadata">

**Author:** [@skilesare](https://forum.dfinity.org/u/skilesare)\
**Replies:** 8\
**Last updated:** [October 9, 2020, 7:06pm UTC](https://forum.dfinity.org/t/help-with-candid-file-construction/1160 "2020-10-09T19:06:23Z")

</div>

I found this project https://mbbill.github.io/JSC.js/ that is a web assembly compilation of javascript core. It only has a few functions that I think I can pull out of the c++(code at https://github.com/mbbill/JSC.js/tr…

---

## [Motoko's BigInt implementation on Wasm](https://forum.dfinity.org/t/motokos-bigint-implementation-on-wasm/595)

<div class="topic-metadata">

**Author:** [@Nick](https://forum.dfinity.org/u/Nick)\
**Replies:** 2\
**Last updated:** [April 17, 2020, 2:47am UTC](https://forum.dfinity.org/t/motokos-bigint-implementation-on-wasm/595 "2020-04-17T02:47:54Z")

</div>

I have a question for the Motoko devs: Does Motoko use GMP for BigInts currently? I ask because GMP is perhaps the fastest BigInt library out there, but it doesn’t port easily to Wasm (because Wasm doesn’t expose carry …

---

## [Making really tiny WebAssembly graphics demos](https://forum.dfinity.org/t/making-really-tiny-webassembly-graphics-demos/322)

<div class="topic-metadata">

**Author:** [@Ori](https://forum.dfinity.org/u/Ori)\
**Replies:** 3\
**Last updated:** [January 15, 2020, 9:41am UTC](https://forum.dfinity.org/t/making-really-tiny-webassembly-graphics-demos/322 "2020-01-15T09:41:51Z")

</div>

Interesting article (always chasing those tiny binaries!): http://cliffle.com/blog/bare-metal-wasm/

---

## [WebAssembly Resource Links](https://forum.dfinity.org/t/webassembly-resource-links/62)

<div class="topic-metadata">

**Author:** [@Ori](https://forum.dfinity.org/u/Ori)\
**Replies:** 2\
**Last updated:** [November 15, 2019, 2:48pm UTC](https://forum.dfinity.org/t/webassembly-resource-links/62 "2019-11-15T14:48:52Z")

</div>

Some general Wasm links for everyone, feel free to add any you think might be useful… WebAssembly Awesome List https://github.com/mbasso/awesome-wasm/blob/master/README.md WebAssembly IDL overview by Lin Clark https:…

---

## [For those who like to write their WebAssembly in hex](https://forum.dfinity.org/t/for-those-who-like-to-write-their-webassembly-in-hex/73)

<div class="topic-metadata">

**Author:** [@Ori](https://forum.dfinity.org/u/Ori)\
**Replies:** 2\
**Last updated:** [November 14, 2019, 4:55am UTC](https://forum.dfinity.org/t/for-those-who-like-to-write-their-webassembly-in-hex/73 "2019-11-14T04:55:29Z")

</div>

If you like a challenge, skip writing in Motoko or WAT and go straight for the hex dump: WebAssembly Opcodes https://pengowray.github.io/wasm-ops/html/wasm-opcodes.html
