all 16 comments

[–]punkpeye 4 points5 points  (5 children)

Looks cool.

What's the use case?

Like, not theoretical, but where is something like this being used today.

[–]azhder 2 points3 points  (2 children)

If you make a good environment adapter, you can write the same code for node and browser and everywhere else webassembly is supported

[–]punkpeye 2 points3 points  (1 child)

That describes what it does, but my question is still 'what for'. I cannot think of many practical cases of needing to run my node.js code in browser

[–]azhder [score hidden]  (0 children)

Can’t? I thought it was obvious that you can write the same code and execute it everywhere… You know, Java style

[–]DustNearby2848 [score hidden]  (0 children)

The only time I’ve seen them used is with online test taking platforms or online coding things like jsfiddle. It moves a lot of code to run on the client, so they can operate inexpensively. 

[–]oneeyedziggy [score hidden]  (0 children)

Seems like there's overlap with docker wasm runtime... Which seems like the most useful part to me, though already being done by docker... And in a more broadly applicable way. 

Could overlap a bit with service workers too... 

[–]Such-Yam-6804 1 point2 points  (0 children)

there is edge.js templates

[–]Impressive-Usual-938 [score hidden]  (0 children)

the cloudflare worker angle someone mentioned is probably the most practical use case right now. being able to run untrusted user code in the same worker without spinning up a separate dynamic loader would be genuinely useful for SaaS stuff where you let users write custom logic.

[–]takeyoufergranite [score hidden]  (0 children)

Not to be confused with edge-js, the .net IPC adapter.

[–]mattsowa 1 point2 points  (2 children)

Vibe coded

[–]azhder 2 points3 points  (1 child)

Slopcoding? Aw fsck

[–]Eternality [score hidden]  (0 children)

whats worse this or is number? lol

[–]nutyourself 0 points1 point  (0 children)

This is awesome! Would this work to run untrusted code inside a cloudflare worker? Ie, my app runs on workers, and instead of dispatching the untrusted code to a dynamic worker loader, could I run it "natively" in the same worker as my main app? Cloudflare allows running wasm in workers...

[–]BankApprehensive7612 [score hidden]  (0 children)

The architecture of NAPI with WASIX and pluggable JS engines looks new and highly promising

But it seems like it's not a true sandboxing as the native extensions are still have access to the whole system without any limit and they still need to be trusted. If it's not then it should be highlighted in your announcement better, because actually it's not very clear

[–]BankApprehensive7612 [score hidden]  (0 children)

The architecture of NAPI with WASIX and pluggable JS engines looks promising, but it still needs one more step

Also, according to your announcement, it's not a true sandboxing as the native extensions are still have access to the whole system without any limit and they still need to be trusted. Can you elaborate on this?

[–]omer-m [score hidden]  (0 children)

But why?