3 ms·
It's not that easy to accept binaries compared to scripts I can open and see what they do.
by my_ghola 10y ago
It's not that easy to accept binaries compared to scripts I can open and see what they do.
- dromen 10y agoYou could store them as source files with a hashbang, and make something like "rustrun" which compiles a single Rust source code file and runs the resulting executable? That should take ~15 minutes. I do wish there was an actual Rust interpreter.
- jdormit 10y agoWhy? Rust is a systems-level language. It's not designed for scripting. If that's what you want, use Python/bash/{yourFavoriteScriptingLanguage}.
- ch4s3 10y agoWell, if you can interpret it then its easy to build a repl, and repls are nice.
- fiedzia 10y ago"being interpreted" in not enough to have useful repl. You also need to be dynamic and introspectable. There are interpreters for C, but it doesn't make it suitable to use with repl.
- baq 10y agothere's nothing bad about interpreting a systems language. there are C interpreters available, too. i'd argue it'd be a very useful feature since the compile times of rust are one of its biggest pain points right now.
- moosingin3space 10y agoThere is a dead project named `rusti` (fails to build on Rust nightly >= 2016-08-01) that can interpret Rust source, and a newer project named `miri` (last commit 3 days ago) that interprets MIR output from the compiler. Several of us in the community, me included, would like a REPL, so I'd keep an eye on these projects to see if they go anywhere.
- chias 10y agoThe big thing for me in this regard is not worrying about dependencies (in a lot of cases). With Rust, when someone asks me for a script that does X, I can compile and ship a binary and they run it end of story. With python, I say "ok, now install python version whatever, then install pip, and then pip install all this stuff, and finally run my script"