3 ms·
for me its undebuggability. -"hey, look at our C Rust FORTRAN to WASM translator, blahblah" -"uhm, cool, how do I debug it?" -"yeah...about that...you cant!"
by artemonster 4mo ago
for me its undebuggability.
-"hey, look at our C Rust FORTRAN to WASM translator, blahblah"
-"uhm, cool, how do I debug it?"
-"yeah...about that...you cant!"
- tdhz77 4mo agoWhy can’t you?
- artemonster 4mo agohow can you? its running wasm in a browser, how do you see original C/Rust code and or variables
- fsloth 4mo agoThis! The only way to get to a stable system at least with c/c++ source, where you can hunt bugs, is to have a fairly large unit test coverage. When something fails - add that as test case; run ctest - pray that this is discoverable with tests. So wasm is a really strange compilation target for systems programming languages. I mean there _are_ ways to debug it in a browser but they sort of suck.
- phickey 4mo agoWasmtime implements a remote debugging server, so that you can debug guest programs with a recent build of LLDB. Set breakpoints based on the source language symbols, single-step through wasm opcodes, anything you'd expect: https://docs.wasmtime.dev/examples-debugging-guest.html https://docs.wasmtime.dev/examples-debugging-guest.html
- artemonster 4mo agostill useless. I had an idea to offload parts of my game core into wasm leaving only UI in the browser - I abandoned that idea when there was absolutely zero possibility for me to debug in browser what is wrong with my core. i just rewrote everything to TS (from rust)