The run project is a universal multi-language runner and smart REPL, built in Rust. It allows developers to script, compile, and iterate seamlessly across 25+ programming languages without switching contexts or command lines. Whether for quick tests or full applications, run provides a consistent and powerful command-line interface.
run is a versatile polyglot command runner and smart REPL (Read-Eval-Print Loop) developed in Rust, designed for developers who work across multiple programming languages. It provides a seamless command line interface that allows users to script, compile, and iterate in more than 25 programming languages without the need for multiple tools.
run --lang python --code "print('hello, polyglot world!')", quickly run code without switching between different command line interfaces.Begin using run easily with commands like:
# Display build metadata
run --version
# Execute a code snippet
run --lang python --code "print('hello, polyglot world!')"
# Detect language from file extension
run examples/go/hello/main.go
# Enter the REPL environment
run
# Pipe JSON input into Node.js
echo '{"name":"Ada"}' | run js --code "const data = JSON.parse(require('fs').readFileSync(0, 'utf8')); console.log(`hi ${data.name}`)"
run leverages existing toolchains, enabling each LanguageEngine to:
This architecture maintains a lightweight core while facilitating easy integration for new languages or toolchains.
The command runner supports a variety of languages categorized as follows:
Explore practical examples included in the repository:
run examples/rust/hello.rs
run examples/typescript/progress.ts
run examples/python/counter.py
Within the REPL, users can leverage commands to optimize their workflow:
| Command | Purpose |
|---|---|
:help | List available meta commands |
:languages | Show detected engines and their status |
:lang <id> or :<alias> | Switch the active programming language |
:detect on/off/toggle | Manage snippet language auto-detection |
:load path/to/file | Execute a specified file in the current session |
:reset | Clear accumulated session state |
:exit / :quit | Exit the REPL environment |
run streamlines the development process for polyglot developers, enabling effective script execution and management across numerous languages.
No comments yet.
Sign in to be the first to comment.