←back to thread

96 points esubaalew | 3 comments | | HN request time: 0.218s | source

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.

1. not--felix ◴[] No.45476026[source]
This is great! How hard is it to add more languages?
replies(2): >>45477156 #>>45477724 #
2. nick__m ◴[] No.45477156[source]
Looking at the code it appears to be somewhat easy, you add your language to language.rs and in the engine folder you add yourlang.rs where you provide an implementation of the LanguageEngine trait for the YourLangEngine struct.

It would be less tedious if some code was factored out into an Helper struct but it doesn't look like it's hard.

3. esubaalew ◴[] No.45477724[source]
It's simple. It was made by someone who's just starting out with Rust.