Show HN: Run – a CLI universal code runner I built while learning Rust (github.com)

96 points by esubaalew ↗ HN
Hi HN — I’m learning Rust and decided to build a universal CLI for running code in many languages. The tool, Run, aims to be a single, minimal dependency utility for: running one-off snippets (from CLI flags), running files, reading and executing piped stdin, and providing language-specific REPLs that you can switch between interactively.

I designed it to support both interpreted languages (Python, JS, Ruby, etc.) and compiled languages (Rust, Go, C/C++). It detects languages from flags or file extensions, can compile temporary files for compiled languages, and exposes a unified REPL experience with commands like :help, :lang, and :quit.

Install: cargo install run-kit (or use the platform downloads on GitHub). Source & releases: https://github.com/Esubaalew/run

I used Rust while following the official learning resources and used AI to speed up development, so I expect there are bugs and rough edges. I’d love feedback on: usability and UX of the REPL, edge cases for piping input to language runtimes, security considerations (sandboxing/resource limits), packaging and cross-platform distribution.

Thanks — I’ll try to answer questions and share design notes.

10 comments

[ 4.1 ms ] story [ 34.2 ms ] thread
This is great! How hard is it to add more languages?
As a small note, Swift is a compiled language. It uses LLVM as a backend, same as Rust and Clang (C/C++/ObjC). It's currently listed under "Web & typed scripting".
I am very intrested why you choose to write such a tool. i normaly have a hand full of shell scripts doing the work, but surly i have to know the used language befor i call the script. Can you explain the motivation?
> exposes a unified REPL experience with commands like :help, :lang, and :quit.

Those sound similar to "magic commands" in IPython and Jupyter?

There is not yet a Jupyter-xeus Rust kernel which would make it really easy to support Rust in JupyterLite in WASM on an .edu Chromebook and in JupyterLab: https://news.ycombinator.com/item?id=43354177

> jupyter_console is the IPython REPL for non-ipykernel jupyter kernels. [like evcxr]

> This magic command logs IPython REPL input and output to a file:

  %logstart -o example.log.py
https://news.ycombinator.com/item?id=25923123 ,

Here's how to support something like _repr_html_() and IPython.display.display() with evcxr_jupyter: https://github.com/evcxr/evcxr/blob/main/evcxr_jupyter/READM...

I'm not sure what the pros and cons of evcxr_repr, jupyter_console + evcxr_jupyter, and Run are?

TBH, my plan was not to replace any of the previous ones, and the name polygot is from my idea of many languages in with a single command, and as simple as run 'code' or run lang code
This lets you read and write variables between different languages, right? Otherwise... what's the point? Can it really compete with something like IPython or yaegi?

But if only to learn rust, this is more interesting than building another "todo list" app