Rust

You can live without Exceptions, If you are using RUST

If you are coming from Java background, where you have used Exception Handling extensively and you have started working on new language like RUST, which doesn’t support Exception Handling then you will be forced to think that does such kind of world really exists? The Java story Java provides full coverage to Exceptions and those are required to be handled with try-catch like construct. In Java, Continue Reading

Structure your data in Rust

Structuring of data in correct way is very important. In java and C++, we use Class & Object. In C, we use structures , unions, and enums. We know that Rust adopts some features of functional programming and OOPS. Class and object is the main weapon of OOPS‘ feature but how rust provides that functionality in its context. We will see this: As Rust is Continue Reading

Memory Management in Rust: Ownership

Do you know any programming language which allows memory management or you want to manage the memory on your own, maybe because you just don’t want to rely on the garbage collector, Rust allows us to do so? In this blog I am going to tell how you can actually manage your memory on an abstract level . Exited!!? here we go…..

How to upload any file on Amazon S3 using Rust?

Welcome everyone to the file upload on Amazon S3 using the Rust. Amazon S3 [Amazon Simple Storage Service] provides virtually limitless storage on the internet. For the bucket creations and security credentials please refer to my last blog. This blog explains following requests using Rust: sending a request to aws S3 bucket, list of objects in the bucket, putting  an object in the bucket, deleting Continue Reading

Are you still using `println` in Rust for debugging?

Printing to standard output is a good way to trace through your code and troubleshoot potential problems. While coding, many programmers use a lot of println statements to see what is going on at different levels in their code. If you are from Java background, you would have used System.out.println() and System.err.println() methods. If you are from Scala background, you would have used println. As Continue Reading

Basic Introduction to Actix-Web Part-1

Actix-web is a small and pragmatic framework of RUST. If you are already a Rust programmer you will probably find yourself at home quickly, but even if you are coming from another programming language you should find actix-web easy to pick up. First of all, you should add an actix-web dependency in cargo.toml [dependencies] actix-web = “0.7”   Creating a basic application with Actix:- A basic example Continue Reading

Rust – References

In my previous blog, we discussed how Rust performs memory management. Interesting as it is, the concept of ownership does come up with a few obstacles when it comes to programming. For instance, if we use a variable as a parameter to another function, Rust doesn’t allow us to access the same variable in that scope anymore. For more details as to why that happens, Continue Reading

Functional Aspect of Rust

Hello friends, we already knew that functional programming is at the peak in a world of the programming language because of its special principle: “functions should be first class values”. In functional programming : functions can be passed as values in other functions one function can return another function a function can be assigned to a variable for later execution, and so forth. But Rust has benefits Continue Reading

What are Smart Pointers in RUST?

In Rust, Smart Pointers are not only pointers but a data structure as well. They are also available in many other languages, but their origin lies in c++. Smart pointers are generally implemented through structs. Following are the types of Smart Pointer in rust. 1. Box The box is the most simple smart pointer which enables recursive types. At compile time rust compiler wants to Continue Reading

How We can do Fearless Concurrency in RUST

Handling concurrent programming safely and efficiently is another of Rust’s major goals. Concurrent programming, where different parts of the program execute independently, and parallelly. Creating Thread-In RUST:- In RUST to create a new thread, we call the thread:: spawn function and pass it in a closure containing the code we want to run in the new thread. Example: Filename: src/main.rs use std::thread; use std::time::Duration; fn Continue Reading

RUST – Ownership

One of the very distinctive features that make Rust stand out among the other languages is the way it does memory management. Memory management in C happens by either declaring a variable or by allocating a chunk of space at runtime. The same then can be freed using explicit function calls. So basically the control resides with the developer which may result in error-prone code. Continue Reading

Introduction to Error Handling in RUST

Like most programming languages, Rust encourages the programmer to handle errors in a particular way. If we talk in a general way Rust gives you an acknowledgment about an error and gives you an option to define some action for it before compile. This makes your program more robust by ensuring that you’ll discover errors and handle them appropriately. Rust group errors into two major Continue Reading

Knoldus Pune Careers - Hiring Freshers

Get a head start on your career at Knoldus. Join us!