Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: malloc is not a function #1

Open
noandrea opened this issue Dec 24, 2020 · 3 comments
Open

error: malloc is not a function #1

noandrea opened this issue Dec 24, 2020 · 3 comments

Comments

@noandrea
Copy link
Owner

noandrea commented Dec 24, 2020

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

rollup/plugins#617

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

@noandrea noandrea changed the title Switch to webpack error: malloc is not a function Dec 24, 2020
@noandrea
Copy link
Owner Author

noandrea commented Jan 1, 2021

also with webpack is not working out of the box, see rustwasm/create-wasm-app#146

@agaviria
Copy link

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
Copy link
Owner Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants