runno  by taybenlor

Sandboxed runtime for executing code snippets in the browser or server

created 4 years ago
729 stars

Top 48.4% on sourcepulse

GitHubView on GitHub
1 Expert Loves This Project
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

Inactive

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

Explore Similar Projects

Starred by Clément Renault Clément Renault(Cofounder of Meilisearch), John Resig John Resig(Author of jQuery; Chief Software Architect at Khan Academy), and
1 more.

browser by lightpanda-io

0.4%
9k
Headless browser for AI/automation tasks, scraping, and LLM training
created 2 years ago
updated 1 day ago
Feedback? Help us improve.