Hacker News new | ask | show | jobs
by kibwen 4990 days ago
The note regarding "preliminary JIT support" buried at the end is one of my favorite new features (and it's a tough call, since there's so damn many new features), since it makes stuff like this possible:

https://github.com/bleibig/rust-repl

I hear that LLVM's JIT support is rather untested, I'd be interested to learn if there are any other major projects besides Rust making use of it.

In general, if you haven't checked out Rust yet I'd still recommend waiting until the implementation of traits is finished off (scheduled as a high priority[1] for 0.5, which is tentatively scheduled for sometime around year's end).

[1] https://github.com/mozilla/rust/wiki/Note-0.5-priorities

EDIT: Oh, and here's a direct link to the detailed release notes rather than the summary presented in the OP:

https://github.com/mozilla/rust/wiki/Doc-detailed-release-no...

4 comments

> I hear that LLVM's JIT support is rather untested, I'd be interested to learn if there are any other major projects besides Rust making use of it.

Sure, OS X since 10.4.

http://llvm.org/Users.html

Also, Mesa / Gallium3D.
OS X does not use LLVM JIT.
From the link:

> Mac OS X 10.4: Uses the LLVM JIT for optimizing many parts of the OpenGL pipeline, including emulating vertex/pixel shaders when hardware support is missing, performing texture format conversion before uploading to the GPU, efficiently packing GPU buffers for vertex submission, and many others.

> Mac OS X 10.6: The OpenCL GPGPU implementation is built on Clang and LLVM compiler technology. This requires parsing an extended dialect of C at runtime and JIT compiling it to run on the CPU, GPU, or both at the same time.

http://llvm.org/Users.html

LLVM's JIT isn't a monolithic entity. There are a bunch of different components and feature options. Some paths are mature and well tested, and others are not. As a result, some projects are using it quite successfully, and some projects with different needs have different experiences.
I believe Pure uses LLVM JIT https://code.google.com/p/pure-lang/
What is the use case for a Rust JIT? A REPL or runtime eval()? I though the static compilation of Rust code was one of it selling points.
A REPL is extremely useful for learning, debugging (instead of using print statements, embed an interpreter to see exactly what is going wrong — IPython's one-line embed() for example), sketching (embed into an incomplete part of your program, try out a few things, when it works paste it to your source), and documentation (IPython's ? and ?? — completion is also part of that).
I think Rust's attractiveness is due to its type system, which does not necessarily need to be statically compiled.
Conversedly, you can have compilation and a REPL, Clojure has a repl yet is always compiled (repl instructions are compiled to JVM bytecode using the usual compilation toolset, then that bytecode is loaded and executed). According to http://www.haskell.org/ghc/docs/latest/html/users_guide/ghci..., GHCi's name doesn't lie and it's actually an interpreter.
Notice that the first link I posted there is to a working Rust REPL (though it's rather rough at the moment, there's a lot that could be done to improve it).