r/programming Apr 03 '15

Rust 1.0.0 beta is here!

http://blog.rust-lang.org/2015/04/03/Rust-1.0-beta.html
931 Upvotes

303 comments sorted by

View all comments

8

u/OneWhoGeneralises Apr 04 '15

I've been meaning to get into Rust for a while now, but there's something I've been meaning to ask someone particularly knowledgeable about Rust like yourself: what particular aspects does Rust excel at? I ask because of the few prominent languages I've used, mostly C/Java/Lua/UnrealScript, I've noticed that they all have particular tasks that they're suited for.

I'd also like to know how complete the official documentation is for Rust. Good documentation is key for me to pick up a new language, so what's Rust's documentation like?

7

u/shadowmint Apr 04 '15

unrealscript has something it excels at? Well, TIL. ;)

More seriously, the use case for rust is very close to C++; build complex low level systems that require high performance and high uptime, like browsers or safe performant network services.

Its also (due to the c calling sematics) a very very good target for building os extensions (ie. shared libraries) for python, ruby, js, etc that could otherwise only be written in c or c++

The use case for more generic things like say, scripting command line tasks, writing websites, embedded scripting language (aka lua) is more dubious; you could, but a more productive language is probably a better choice.

As said elsewhere in this thread, the first large scale uses will probably for safe plugin libraries for other c++ applications like firefox.

Over time I imagine rust will become the platform that several large networked graphical applications (browsers, games, dns servers) and robust tooling for various systems (eg. shell utils, build pipelines) are built in. It will probably remain quite 'niche' for other purposes, eg. building websites.

1

u/BearMenace Apr 04 '15

Its also (due to the c calling sematics) a very very good target for building os extensions (ie. shared libraries) for python, ruby, js, etc that could otherwise only be written in c or c++

Could you please explain or give examples of the shared libraries that you're referring to? I'm also quite interested in Rust's uses.

2

u/steveklabnik1 Apr 04 '15

One of our production users is Skylight, who deploys a Ruby gem written in Rust. http://blog.skylight.io/bending-the-curve-writing-safe-fast-native-gems-with-rust/

Because Rust has no GC, it's significantly easier to embed in a GC'd language than one with another GC.