runno  by taybenlor

Sandboxed runtime for executing code snippets in the browser or server

Created 4 years ago
738 stars

Top 47.0% on SourcePulse

GitHubView on GitHub
Project Summary

Runno provides sandboxed runtimes for programming languages and WASI binaries, targeting educators and developers who need to embed runnable code examples directly into web applications or run them server-side. It simplifies code execution for beginners and enables interactive demonstrations without requiring local installations.

How It Works

Runno leverages WebAssembly (WASM) and the WebAssembly System Interface (WASI) to execute code within a secure, isolated JavaScript environment. It emulates a Unix-like sandbox with a virtual file system, allowing various programming languages (Python, Ruby, C, C++, PHP) and WASI binaries to run directly in the browser or Node.js. This approach offers a consistent execution environment and avoids the complexities of native installations.

Quick Start & Requirements

  • Browser: Install @runno/runtime via npm and import it. Use <runno-run runtime="python">...</runno-run> in HTML. Requires specific HTTP headers (Cross-Origin-Opener-Policy: same-origin, Cross-Origin-Embedder-Policy: require-corp) for SharedArrayBuffer support.
  • Node.js: Install @runno/sandbox via npm and use runCode("runtime", "code").
  • WASI: Use WASI.start(fetch("/binary.wasm"), { ... }).
  • Documentation: Runno.dev

Highlighted Details

  • Supports multiple runtimes including Python, Ruby, QuickJS, SQLite, Clang, Clang++, and PHP-CGI.
  • Enables direct execution of WASI binaries with virtual file system support.
  • Provides Web Components for easy integration into web pages.
  • Offers a Node.js package for server-side code execution.

Maintenance & Community

The project is actively developed by taybenlor. Community engagement and support channels are not explicitly detailed in the README.

Licensing & Compatibility

Licensed under the MIT License, permitting commercial use and integration into closed-source projects.

Limitations & Caveats

Language availability is limited to those compiled to WASI. Installing external packages or modules within the sandbox is difficult, making it best suited for small, self-contained code examples. WASI preview1 is supported, but preview2 is out of scope.

Health Check
Last Commit

1 week ago

Responsiveness

1 day

Pull Requests (30d)
1
Issues (30d)
0
Star History
8 stars in the last 30 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), Vincent Weisser Vincent Weisser(Cofounder of Prime Intellect), and
7 more.

dalai by cocktailpeanut

0%
13k
Local LLM inference via CLI tool and Node.js API
Created 2 years ago
Updated 1 year ago
Feedback? Help us improve.