All you need to know about RUST

Rust is a safe system programming language which is fast and concurrent developed by Mozilla Research and is a community driven project.

The Rust playlist  contains 6 videos in which rust team talks about the various ascpects of rust language and their vision for the language.

This blog is just a summary of those video series,

Why do we call rust language safe, well there are a lot of factors by which rust earns that status.

What if I tell you, rust at complilation warns you about the flaws in your code which are likely to be secuity vulnerabilities, it catches a category of error and bugs such as memory error etc

HACK WITHOUT FEAR

Such safety feature enables the user to develop application without the fear of crashes and safety features ie we can build application without worrying much about safety factors etc, rust at complilation check takes care of those problems, this helps the application got to production faster.

If you have used nodejs you will be familiar with npm which is a package manager which will help you ship you builds, well in the first time of the history of system programming language we have cargo which is a package manager for rust which is a very useful tool for publishing your builds, managing dependencies, run tests and lots more.

There are couple of more features about rust which developers can brag about :

Ownership and borrowing concept helps in releasing these features in rust

Memory management 

In most HLL we have a garbage collector which clears the output variables and objects often we run into a problem of garbage collection pause ie these are outputs which are visible to the user in the new session this mostly happens in machine with low computation ability such as a cheap phone.

In rust the user should know the type of their variables, this helps in clearing out the output avoiding the pause situation.

Zero cost abstraction

There is always a cost associated with other languages ex the language provides security check due to which in the compilation time this overhead of security check is gonna add a delay there.

Rust has no cost or over head attached with in runtime.

There is always has been a debate over web vs native, where the argument has been that native apps are far better than web. Rust is trying to provide the same experience of native apps with the web apps, this is a huge innovation in providing the same kind of service to people who have lower end devices.

Programmers could use asm.js for tunning their javascript code and rust components can be integrated with it for improving the performance.

Safer parallelism

Parallelism has been there in the past but has always been problematic and not stable if not customized properly. Browsers usually run as one process as handling parallel process was very difficult with c/c++.

Rust provides safer and stable parallelism in the code.

In the past people have spent time to make parallel process into single thread to avoid crashes and bugs. Parallelism becomes more difficult when another thread changes or access your original memory, leading to data race situations.

In Rust there will never be a case of a data race situation.

Rust introduces a new paradigm called the ownership concept which provides safer parallelism, in which every piece of data has a owner which only has the right to read and write from the memory.

Rust is thinking about cases where running parallel could help in optimising the battery consumption.

There are two release channels for rust which are stable and nighlty channels.

Stable versions is the place where there is guarantee that implementation technique will not crash or fail.

Rust builds are released every 6 weeks

In the nighlty release channels there are new implementations of rust which are likely to crash at some point of time and volunteers use the nightly build with the agreement that this patch of code/ cutting edge may fail.

Rust team welcomes input to the whole pipeline and changes from its communities through the  rfc process , where there’s a lot of discussion about language changes and possibility .

I have an another reason for you which will trigger you to be a part of Rust, most of the famous languages are supported by large corporate companies who always have a hidden agenda behind their investments and in the past many have stopped support.

Rust is something more .. its a community driven project 

It’s never gonna get stopped and always going to have a great community support (for example go post a question in rust irc channel and see the response) plus its decentralization of amazing work which does not come up with some strings attached.

Rust into production 

As I mentioned above, you can be fearless and take your build to production with rust.

Rust is trying to create web applications and tools on the web that will empower user privacy and security on the go.

In the past browser engine have been developed in c/c++ which is very complex and comes up with a need for people to understand various concepts.

Servo is a browser engine build on rust

Servo is a community  project which is gonna render a web page with full utlization of the multiple cores of the hardware which is gonna give a user a noticiable change in its performance.

Shipping rust in Firefox

There are constant attempts from the Firefox engineering team to integrate servo with Firefox to provide better performance with servo components.

Rust is gonna provide a faster, safer and better security in browser market.

if you don’t bieleve me with all the above points, I have just one line for you

Go ahead & try rust !! 

Happy Rust programming 🙂

Advertisements

3 thoughts on “All you need to know about RUST

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s