Fork me on GitHub

Has anyone exprimented with wasm modules from CLJS? I'm looking at this cool talk about WASI, and she mentions that node is reachable through wasm-bindgen.


Does that mean we're could write .wasm modules in Clojure?


wasm does have some limitations, for instance no first class functions. So I don't think we can compile arbitrary Clojure code to wasm (not 100% sure). I'd look at it a bit like how we generate Hiccup from data


My OP was mainly about consuming warm modules. In case that wasn’t clear. All this is very new to me, so I don’t know how to phrase my questions.


I did not have time to look at this library and I believe it is still at early phase. But I think author (@U0FR82FU1) can help you

Roman Liutikov11:02:16

👋 clj wasm is an experiment to write wasm in Clojure syntax, no data structures or library , it's just syntax

👋 4

@U3X7174KS this seems to speak to the point you made about the limitations:

👍 4

I'm trying to figure out sourcemaps. I've got the compiler option set to a string to output our sourcemaps for prod. I made a prod build, triggered an error in the app and trying to go to the source-mapped error location but not making any progress. I've right clicked on the minified output and tried to add a source map but nothing seems to happen. anyone know how i could get more traction?


> I've right clicked on the minified output Where exactly? In DevTools, I don't have to click on anything - it attaches the sourcemaps automatically.


in the source. there's a way to add a source maps url. I was hoping that clicking on an error in the console would take me to the source mapped position but that doesn't seem to be the case


> there's a way to add a source maps url I know only of a way to specify the source map in the minified source itself. When it is done, DevTools automatically download the source map and use it.


we have that as well. So in theory it should work. If you can trigger an error, if you click on the link to the source in the console next to the error message does it take you to the source mapped error spot?


With shadow-cljs, I can make it work with shadow-cljs watch but not with shadow-cljs release.


Never mind that, I had to clear the cache. Now it works with shadow-cljs release as well.


Aaand disregard all that. I'm stupid - I didn't realize that shadow-cljs writes to the exact same directory by default, so my debug build just overwritten the release build.