Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement a Rust REPL #1120

Closed
teratorn opened this issue Nov 2, 2011 · 30 comments
Closed

Implement a Rust REPL #1120

teratorn opened this issue Nov 2, 2011 · 30 comments
Labels
A-runtime Area: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflows E-hard Call for participation: Hard difficulty. Experience needed to fix: A lot.

Comments

@teratorn
Copy link

teratorn commented Nov 2, 2011

REPLs are great.

@brson
Copy link
Contributor

brson commented Nov 2, 2011

It's true, REPLs are great!

@kud1ing
Copy link

kud1ing commented Jan 24, 2012

See also https://github.com/killerswan/rustx

@bstrie
Copy link
Contributor

bstrie commented Feb 7, 2012

@mcandre
Copy link

mcandre commented Feb 7, 2012

REPLs are indespensible. CL sucks, but I'd almost rather use it than a better language without a good REPL.

@bstrie
Copy link
Contributor

bstrie commented Feb 13, 2012

Until bleibig's REPL is stable, feel free to use my stable-ish REPL-ish sort of thing: https://github.com/bstrie/rust-rustic

(But this is by no means a long-term solution.)

@graydon
Copy link
Contributor

graydon commented Feb 13, 2012

great. longer term I concur we should fold something like bleibig's repl into rustc. an --interactive flag would be great.

@mcandre
Copy link

mcandre commented Feb 13, 2012

--interactive would be helpful.

Suggestion: When argc < 1, default to interactive like scripting languages do.

@ghost ghost assigned graydon Apr 12, 2012
@dbp
Copy link
Contributor

dbp commented Aug 21, 2012

Somewhat along the same lines as bstrie's rustic, here is a repl that I wrote. The main difference is that it behaves somewhat like a future repl based on LLVM's interpreter probably should behave (ie, statement by statement evaluation, local definitions, imports, etc), but under the hood it is a hack - it is writing out temp files and using rustc to compile them. either way, it is really fun to use, and works right now!

http://github.com/dbp/rustrepl

@ghost ghost assigned brson Sep 25, 2012
@catamorphism
Copy link
Contributor

This exists now (rusti) but is not working too well right now: #4407

@kud1ing
Copy link

kud1ing commented Feb 12, 2013

Is the scope of this issue "create a REPL" fulfilled?

@bstrie
Copy link
Contributor

bstrie commented Feb 12, 2013

@kud1ing probably. Separate issues can be opened to address the current REPL breakage.

@brson
Copy link
Contributor

brson commented Feb 12, 2013

Closing.

@brson brson closed this as completed Feb 12, 2013
@rampion
Copy link

rampion commented Jan 10, 2014

Should this be reopened since rusti was removed? #9818

@thestinger
Copy link
Contributor

#9898

@shaleh
Copy link

shaleh commented Jul 10, 2014

Yes please!! I often just want to play with a function or two and see how things work.

@pnkfelix
Copy link
Member

@shaleh are you aware of this: http://play.rust-lang.org/ ?

It has the advantage over a local repl that it is really trivial to share your example with other people once you're done hacking (see the "share" button at the bottom).

@shaleh
Copy link

shaleh commented Jul 11, 2014

On Jul 10, 2014, at 3:08 PM, Felix S Klock II wrote:

@shaleh are you aware of this: http://play.rust-lang.org/ ?

It has the advantage over a local repl that it is really trivial to share your example with other people once you're done hacking (see the "share" button at the bottom).


Reply to this email directly or view it on GitHub.

Yeah that's nice as long as you only hack where there is networking. Not all of my house gets decent WIFI much less trains, cars, etc.

If it can work as an online toy then surely we can get a real version at the shell.

@gsingh93
Copy link
Contributor

Can this be reopened? I often don't want to share or save the stuff I do in a REPL, so I'd prefer a command line utility.

@gsingh93
Copy link
Contributor

Oh, I didn't see #9898. I guess dicussion can continue there, but I'd like to see something like rusti for the command line soon, even if it isn't a "proper" REPL. That thread seems to be talking about the proper way to do it, which may take some time to implement.

@jansegre
Copy link

Someone said something about cling, just to bring it up here. I think it's an awesome project to be based on.

@kindlychung
Copy link
Contributor

Instant feedback is extremely gratifying. Even Java is going to have a repl in the next major release.

@tyoc213
Copy link
Contributor

tyoc213 commented Jan 25, 2016

What would be the actual work on this? (even if external?) because rusti was removed as I see from #9818

@mitaa
Copy link
Contributor

mitaa commented Jan 25, 2016

rusti lives on here https://github.com/murarth/rusti

@PallHaraldsson
Copy link

PallHaraldsson commented Aug 24, 2016

FYI: Julia language has a REPL, and looking at: https://github.com/iamed2/Rust.jl

it seems you can include Rust code in your files, just as you can C++ with Cxx.jl, or at the REPL, using either language interactively (while Cxx is more slick). [Already it was pretty simple to call Rust, no more difficult than C. If I ever need a non-GC language, I've been thinking Rust would be the preferred complementary language over C.]

Just looking at the code I see AST.jl, not sure you can generate Rust code from Julia (I recall having been told that, maybe a misunderstanding).

Note: https://github.com/iamed2/Rust.jl/blob/master/deps/deps.jl

@xfbs
Copy link

xfbs commented Apr 20, 2018

Should this issue be repopened? rusti hasn't seen much love recently and depends on a very old version of the compiler. Would anyone else like to see a REPL?

@chkno
Copy link

chkno commented Apr 20, 2018

See rust-lang/rfcs#655

@joshlk
Copy link

joshlk commented May 10, 2020

evcxr is currently the best REPL implementation

@ibraheemdev
Copy link
Member

ibraheemdev commented Nov 26, 2020

Rust already has a REPL. Try #bot-usage on the rust discord server 😄

Screen Shot 2020-11-26 at 4 57 12 PM

bjorn3 added a commit to bjorn3/rust that referenced this issue Dec 27, 2020
@mental32
Copy link
Contributor

mental32 commented Jan 2, 2021

Rust already has a REPL. Try #bot-usage on the rust discord server smile

Screen Shot 2020-11-26 at 4 57 12 PM

That's more like a REP than a REPL 😄 (evcxr is pretty cool)

@timmyjose
Copy link

evcxr is currently the best REPL implementation

Works rather nicely (if very slowly). Good for small bits of experimentation. Thanks for sharing!

coastalwhite pushed a commit to coastalwhite/rust that referenced this issue Aug 5, 2023
celinval added a commit to celinval/rust-dev that referenced this issue Jun 4, 2024
The `vector-map` crate indirectly depends on a vulnerable version of
rand_core. This crate hasn't been released for the past 2 years,
and there hasn't been any activity in their github either. I'm replacing
it by `linear-map` for now to fix the security warnings.

Note that linear-map last release was 6 years ago, so we may have to
remove it eventually. At least this crate only depends on serde.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-runtime Area: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflows E-hard Call for participation: Hard difficulty. Experience needed to fix: A lot.
Projects
None yet
Development

No branches or pull requests