noandrea / costoflife.ui

A tentative landing / frontend for CostOf.Life
https://thecostof.life
1 stars 0 forks source link

error: malloc is not a function #1

Open noandrea opened 3 years ago

noandrea commented 3 years ago

due to a wasm issue with rollup and wasm it's required to switch to webpack

https://github.com/rollup/plugins/issues/617

It has been reported (though I cannot find anymore where) that webpack doesn't suffer from this problem with wasm bundles

noandrea commented 3 years ago

also with webpack is not working out of the box, see https://github.com/rustwasm/create-wasm-app/issues/146

agaviria commented 3 years ago

Hi there! I'm excited to see a Rust, WASM, Svelte stack. I'm not much of a front-end guy just a Rust apprentice here. I'm working towards learning Svelte for 2021 and I ran into your GH repo by your article posted on Dev.to. As I was searching for more examples I happened to find a working repository that is using Webpack and WasmerJS. I hope this can help you as a benchmark to get the JS bindings working in Svelte. svelte-wasi-with-rust

noandrea commented 3 years ago

Hey @agaviria, thanks for the tip, I am not a front-end guy myself, but I had the feeling (and the hope) that everything will just work together magically. I spent quite some time battling with webpack, rollup and parcel and the wasm generated bundle without success, the project you linked is interesting, but I what I am really seeking to have the simplest way out of it.