Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
45 lines (32 sloc) 1.67 KB
Project: rust-repl
Author: Brian Leibig
== Description ==
This is an interactive read-eval-print-loop (REPL) for the Rust
programming language[1] being developed by Mozilla. It hopes to
eventually be a viable solution to issue #1120[2]. It works by
presenting a prompt, reading input, then integraing with the compiler
to compile it to a LLVM module which is then executed by the JIT
compiler. If an expression was given, it will evaluate and print its
Some portions of the implementation were based on another repl by
dbp[3], but unlike his version, this aims to be more tightly
integrated with the compiler, and keep everything in memory rather
than use temporary files.
As the language and libraries are rapidly evolving, this is meant to
work with the latest git master revision of rust on github.
== Current Status ==
Right now everything seems to work, except the LLVM JIT. When calling
jit::exec, LLVM gives the following error:
LLVM ERROR: Inline asm not supported by this streamer because we don't have an asm parser for this target
I've deduced that this error comes from the .create() call for the
ExecutionEngine in the LLVMRustJIT function in RustWrapper.cpp.
Also, the sysroot is manually set to "/usr/local/", if this is not
correct for your machine, change the maybe_sysroot value in the
options definition in run_input().
== Future Goals ==
* Use readline or something similar for getting input, managing history etc.
* Identify input type based on how it parses instead of str::starts_with
* Implement commands for the REPL similar to how GHCi handles :commands
Jump to Line
Something went wrong with that request. Please try again.