Re:Introduction to Isolated-VM in Node.js
by fathyb on Thursday September 23, 2021 @09:12PM
(#28637556)
I've been using isolated-vm for refloat.io, but ended up switching to the native Node.js vm API after having issues getting its native module to run with vercel/pkg.
One big difference is isolated-vm allows creating a separate v8 Isolate, separating the memory heaps, making it safer to run untrusted code. I don't think we can do that with the native Node.js API yet.
Re:Introduction to Isolated-VM in Node.js
by NhanH on Wednesday September 22, 2021 @09:20PM
(#28624190)
Isolated-vm was originally developed for the game screeps. It’s a programming game where each player’s code is ran on the server, so isolated-vm helps with both runtime issue (one player’s code crashing not affecting everyone else on the same node) as well as adding some security benefits.
One big difference is isolated-vm allows creating a separate v8 Isolate, separating the memory heaps, making it safer to run untrusted code. I don't think we can do that with the native Node.js API yet.