You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for MacroQuad, a nice way to learn Rust for a newbee like myself.
I think i am going to love it so much, i want to use it in production. But I have a problem with compiling to WASM.
this means you are using wasm-bindgen. Wasm-bindgen requires post-processing your .wasm file with a third party binary tool. Its not very easy to set up, there is a script someone posted that might help with that: #212 (comment)
You can also search for wasm-bindgen here on github, there was a lot of issues about that.
Thanks for MacroQuad, a nice way to learn Rust for a newbee like myself.
I think i am going to love it so much, i want to use it in production. But I have a problem with compiling to WASM.
Snake compiles to WASM, and works in the browser:
https://github.com/not-fl3/macroquad/blob/master/examples/snake.rs
Shadertoy compiles to WASM, but does not work in the browser (tested in recent Chrome, Brave)
https://github.com/not-fl3/macroquad/blob/master/examples/shadertoy.rs
I think Snake (1) uses a html 2d canvas, and Shadertoy (2) uses a html 3d canvas (with Shaders).
Is using a 3d canvas a problem for WASM?
Shadertoy has a lot of errors is the browser inspector console:
No __wbindgen_string_new function in gl.js
add_missing_functions_stabs @ mq_js_bundle.js:3
(anonymous) @ mq_js_bundle.js:3
Promise.then (async)
load @ mq_js_bundle.js:3
(anonymous) @ (index):27
mq_js_bundle.js:3 No __wbindgen_is_object function in gl.js
add_missing_functions_stabs @ mq_js_bundle.js:3
(anonymous) @ mq_js_bundle.js:3
Promise.then (async)
load @ mq_js_bundle.js:3
(anonymous) @ (index):27
mq_js_bundle.js:3 No __wbindgen_is_string function in gl.js
add_missing_functions_stabs @ mq_js_bundle.js:3
(anonymous) @ mq_js_bundle.js:3
Promise.then (async)
load @ mq_js_bundle.js:3
(anonymous) @ (index):27
mq_js_bundle.js:3
...
mq_js_bundle.js:3 WASM failed to load, probably incompatible gl.js version
The text was updated successfully, but these errors were encountered: