ianjsikes / rust-wasm-webpack-tutorial

Finished example project for my guide on setting up a Webpack project with Rust and WebAssembly
https://medium.com/@ianjsikes/get-started-with-rust-webassembly-and-webpack-58d28e219635
MIT License
121 stars 14 forks source link

runtime exits before rust function can be called #1

Closed superchris closed 7 years ago

superchris commented 7 years ago

I get this in the console: Assertion failed: the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits). This is after I see Calling rust functions from javascript! but I do not see the result of calling the function.

belfz commented 7 years ago

I get the same error. After some research, it looks like some missing compiler flag. Any ideas on how to fix that?

superchris commented 7 years ago

Yes, I this is fixed in PR #2 it just hasn't been merged.

superchris commented 7 years ago

Oops i shouldn't have closed it yet

marcocastignoli commented 7 years ago

You forgot to update {noExitRuntime: true} on https://medium.com/@ianjsikes/get-started-with-rust-webassembly-and-webpack-58d28e219635

ianjsikes commented 7 years ago

Got it, thanks for the reminder.