OneBite.Dev - Coding blog in a bite size

🧑‍🚀 Blog for learning rust

rust blog posts, coding tips and trick in a bitesize to help you learn rust.

Traits in Rust

Learn what is Traits in Rust. Tutorial on how to implement Traits in Rust programming language. It's similar to interfaces in other languages

rust

What is Lifetime in Rust?

Understand What is Lifetime in Rust? what error a lifetime could cause and how to solve this problem

rust

Generic Types in Rust

Learn what is Generic Types in Rust. Tutorial on how to implement Generic Types in Rust programming language

rust

Hash Map in Rust

Learn what is Hash Map in Rust. Tutorial on how to use Hash Map, the key value pair collection in Rust

rust

Vector: collection in Rust

Vector can be used to storing lists of values in Rust. It's one of the collection that included in standard library in Rust

rust

Collections data structure in Rust

Learn about Collections data structure in Rust. What collections is available and how to use it

rust

If and let in Rust Control flow

When there are many possible values, but we only care about one in a control flow, we can use if and let syntax in rust.

rust

Match control flow in Rust

There is one more powerful control flow in Rust, which is match. It's pretty straightforward, we would return a value based on match condition

rust

The Option Enum in Rust, null alternative

Rust didn't have a null value. But there is an Enum Option that can implement null behavior

rust

Enums in Rust

Learn what is enums in Rust programming language. How to use enums and when to use it

rust

Struct Method in Rust

How to add a method on a struct in Rust. If we do have a special repeatable task for a struct, it's better to put it, in it's own function

rust

Struct data type in Rust

Learn what is Struct data type in Rust? How to use structure data type in Rust programming language

rust

Slice data type in Rust

Learn about Slice data type in Rust. It's a reference for sequence of elements in a collection

rust

References in Rust

This is part of the ownership lesson in Rust. References is a cheap way to use other variable on other function without passing the whole value

rust

Understand the stack and the heap

What is stack and what is heap in term of memory allocating in programming language?

rust computer

What is ownership in Rust

Understand what is ownership in Rust. Ownership enables Rust to make memory safety guarantees without needing a garbage collector.

rust

Looping in Rust

Learn how to loop a program in Rust, using for, loop, and while. It's part of the control flow process

rust

Variable Scope in Rust

Understand the variable scope in Rust. This is an important part so we can learn how Rust allocating their memory later

rust

Conditional statement in Rust

Learn how to implement a Conditional statement in Rust. Using if and else. We can also use just one line if else to declare variable

rust

String in Rust

String in Rust might be more complex than you think. When people talk about string, it can have multiple meaning

rust

Function in Rust

What is a function in Rust? Learn how to declare and user a function in Rust.

rust

Data types in Rust

What are available data types in Rust ? It also has two subsets: a scalar data type and a compound data type, including array and tuples

rust

Declare a variable in Rust and mutability

Learn how to declare a variable in Rust. Also see what is mutable and immutable variable

rust

What is Cargo in Rust

Cargo is Rust's build system and package manager. It's an optional tool, but it handles a lot of tasks to work with Rust

rust

Hello World in Rust

Write our Hello World in Rust. It requires compiling and running

rust

Getting started with Rust, installation

Let's set up our Rust development environment. We will use Rustup / Cargo as our installer and package manager.

rust

I start learning Rust

I always see posts about Rust on dev-related blogs. I don't have the motivation to learn about it, as I heard it's built for complex project. Maybe I can use this blog to motivate me.

rust