Show HN: Execute JavaScript in a WebAssembly QuickJS sandbox

This TypeScript package allows you to safely execute JavaScript code within a WebAssembly sandbox using the QuickJS engine. Perfect for isolating and running untrusted code securely, it leverages the lightweight and fast QuickJS engine compiled to WebAssembly, providing a robust environment for code execution.

Features

- *Security*: Run untrusted JavaScript code in a safe, isolated environment.

- *File System*: Can mount a virtual file system

- *Custom Node Modules*: Custom node modules are mountable

- *Fetch Client*: Can provide a fetch client to make http(s) calls

- *Test-Runner*: Includes a test runner and chai based `expect`

- *Performance*: Benefit from the lightweight and efficient QuickJS engine.

- *Versatility*: Easily integrate with existing TypeScript projects.

- *Simplicity*: User-friendly API for executing and managing JavaScript code in the sandbox.

206 points sebastianwessel 2 years ago 65 comments

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton