Fork me on GitHub
#clojurescript
<
2020-02-14
>
pez10:02:13

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. https://www.youtube.com/watch?v=fh9WXPu0hw8

pez10:02:47

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

teodorlu10:02:30

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

pez10:02:38

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.

delaguardo10:02:05

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
pez11:02:24

@U3X7174KS this seems to speak to the point you made about the limitations: https://youtu.be/6Y3W94_8scw?t=321

👍 4
dpsutton21:02:17

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?

p-himik11:02:16

> 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.

dpsutton15:02:49

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

p-himik15:02:55

> 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.

dpsutton15:02:54

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?

p-himik15:02:13

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

p-himik15:02:26

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

p-himik15:02:08

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.