News for hackers. Stuff that matters.
Re:Microsandbox: Virtual Machines that feel and perform like... by SwiftyBug on Friday May 30, 2025 @01:30PM (#44138317)
Kind of almost off-topic: I'm working on a project where I must run possibly untrusted JavaScript code. I want to run it in an isolated environment. This looks like a very nice solution as I could spin up a microsandbox and securely run the code. I could even have a pool os live sandboxes so I wouldn't even experience the 200ms starts. Because this is OCI-compatible, I could even provide a whole sandboxed environment on which to run that code. Would that be a good use case for this? Are there better alternatives?
Re:Microsandbox: Virtual Machines that feel and perform like... by ericb on Friday May 30, 2025 @02:06PM (#44138630)
runsc / gVisor is interesting also as the runsc engine can be run from within Docker/Docker Desktop.

gVisor has performance problems, though. Their data shows 1/3rd the throughput vs. docker runtime for concurrent network calls--if that's an issue for your use-case.

Re:Microsandbox: Virtual Machines that feel and perform like... by appcypher on Friday May 30, 2025 @01:41PM (#44138399)
> Would that be a good use case for this?

That is an ideal use case

> Are there better alternatives?

Created microsandbox because I didn't find any

Re:Microsandbox: Virtual Machines that feel and perform like... by SwiftyBug on Friday May 30, 2025 @02:03PM (#44138598)
Awesome. This is really good timing. I'm going to give it a try.
Re:Microsandbox: Virtual Machines that feel and perform like... by spixy on Sunday June 01, 2025 @04:10AM (#44149380)
Windows has built-in sandbox and its good.

https://learn.microsoft.com/en-us/windows/security/applicati...

Re:Microsandbox: Virtual Machines that feel and perform like... by apitman on Friday May 30, 2025 @11:50PM (#44141729)
You might be able to get away with running QuickJS compiled to WebAssembly: https://til.simonwillison.net/npm/self-hosted-quickjs
Re:Microsandbox: Virtual Machines that feel and perform like... by yencabulator on Saturday May 31, 2025 @09:39PM (#44148088)
Convenience helper for that: https://github.com/bytecodealliance/javy
Re:Microsandbox: Virtual Machines that feel and perform like... by arjunbajaj on Saturday May 31, 2025 @09:56AM (#44144314)
I recommend trying Javy[0]. Javy allows you to build a WASM file that includes Javy's JS interpreter along with your JS source code. Note that Javy is a heavily sandboxed environment so it doesn't have access to the internet, or npm modules, a desirable feature for running user code.

We're building an IoT Cloud Platform, Fostrom[1] where we're using Javy to power our Actions infrastructure. But instead of compiling each Action's JS code to a Javy WASM module, I figured out a simpler way by creating a single WASM module with our wrapper code (which contains some further isolation and helpful functions), and we provide the user code as an input while executing the single pre-compiled WASM module.

[0] https://github.com/bytecodealliance/javy

[1] https://fostrom.io