Quantcast
Channel: tutorials - The Rust Programming Language Forum
Browsing all 31 articles
Browse latest View live

Help annotate lifetimes

according to a tutorial this has a problem validating which reference to use: fn main() { let magic1 = String::from("abracadabra!"); let magic2 = String::from("shazam!"); let result =...

View Article



A tour of `dyn Trait`

dyn Trait comes up a lot in this forum in various ways: not understanding the fundamentals of dyn Trait, e.g. confusion with generics or subtyping more typical lifetime problems due to dyn Trait's...

View Article

Learn Rust by 500 lines code, build a Todo Cli Application

The tutorial: GitHub - cuppar/rtd: Learn Rust by 500 lines code Want to alleviate Rust's steep learning curve. Designed to learn by doing Have the ultimate reading experience Under intense development...

View Article

Introduction to Pointer Metadata

Hello! I have just written a blog post about why and how pointer metadata is used in Rust. While most of the information is related to stable Rust, it also uses nightly Rust with the ptr_metadata...

View Article

Why this compile?

Hi, I am reading a Book and found this code enum Location { Point(i32), Range(i32, i32) } fn main() { let l: Location = Location::Range(0, 5); let n = match l { Location::Point(_) => -1,...

View Article


Pls explain annotation

ive read some documents on lifetime annotation still i cant grasp it. please help. 4 posts - 4 participants Read full topic

View Article

Image may be NSFW.
Clik here to view.

Async Rust and a High-level Overview of Tokio's Architecture

This post discusses asynchronous programming and different multitasking methods such as preemptive and cooperative. It explains the advantages of using asynchronous tasks instead of traditional...

View Article

Installing & Configuring OpenCV crate for rust on macOS

Somehow for a lot of people OpenCV goes very bad on macOS. I've created a github gist that will help you set it up properly on macOS. The issue i think arises when setting up the environment variables...

View Article


Image may be NSFW.
Clik here to view.

Setup Anaconda, Jupyter, and Rust | Data Crayon

datacrayon.com Setup Anaconda, Jupyter, and Rust | Data Crayon We are taking a practical approach in the following sections. As such, we need the right tools and environments available in order to...

View Article


Image may be NSFW.
Clik here to view.

Introduction to parsing a programming language with pest

Hi! I wrote a post about using Rust and pest to parse a programming language. It is the first post in a series about designing and implementing a programming language. This post is effectively an...

View Article

Image may be NSFW.
Clik here to view.

Data Analytics and Box Plots with Rust Notebooks

datacrayon.com Box Plots at the Olympics | Data Crayon We work towards illustrating the age and height of athletes grouped by games in the 120 years of Olympic history. Working towards illustrating...

View Article

Image may be NSFW.
Clik here to view.

Descriptive Statistics with NDArray in Rust Notebooks

datacrayon.com Descriptive Statistics with NDArray | Data Crayon We're going to take a look at some of the tools we have for descriptive statistics. Using ndarray and ndarray-stats for descriptive...

View Article

Image may be NSFW.
Clik here to view.

Multidimensional Arrays and Operations with NDArray

datacrayon.com Multidimensional Arrays and Operations with NDArray | Data Crayon The ndarray crate provides us with a multidimensional container that can contain general or numerical elements....

View Article


Image may be NSFW.
Clik here to view.

I Got a Milk-V Duo (and It’s Running Rust) - Barrett's Club

barretts.club I Got a Milk-V Duo (and It’s Running Rust) - Barrett's Club This is a scary new hobby... 🤤️ I made a blog post that helps folks get into RISC-V with Rust! Since the Milk-V Duo is pretty...

View Article

Image may be NSFW.
Clik here to view.

Building a Lightweight Software Ray Marching Engine with Rust (self-referential)

Introduction In order to practice Rust more effectively, I have decided to rewrite some some interesting projects in Rust. The first project has been finished, it is a CPU Path Tracing tiny project,...

View Article


Suppress name mangling for extern “stdcall”

Not really a tutorial, but an answer to a frustrating riddle: How would you call a stdcall function without a mangled name from a Windows DLL? The standard answer is you don't, because anyone who uses...

View Article

Image may be NSFW.
Clik here to view.

Oxpilot: A build your own AI copilot project

Hi Rustaceans! I am new to Rust, read "the book" and started learning by building a project, I found LLM/AI being the most interesting area. So decide to build a local (=not using OpenAI API),...

View Article


Image may be NSFW.
Clik here to view.

Concurrent MongoDB testing in Rust

Hi everyone, I have written my first blog post around my experience with Concurrent MongoDB testing in Rust. I've been using Rust for a little over a year and would love to get some thoughts or...

View Article

Image may be NSFW.
Clik here to view.

How to work with `!Sized` types in Rust

sgued.fr How to work with `!Sized` types in `Rust` <p>Sizedness in Rust is a particular topic. I recently found myself having to work with unsized types when trying to reduce the use of...

View Article

Emulating an `:empty` macro matcher

It's a somewhat repeated desire to be able to expand macro code if a $()? captured anything but without actually capturing/expanding any matchers for the contents of the repetition. An oft proposed...

View Article
Browsing all 31 articles
Browse latest View live




Latest Images