rust – Why can’t I store a value and a reference to that value in the same struct?

Let’s look at a simple implementation of this: struct Parent { count: u32, } struct Child<‘a> { parent: &’a Parent, } struct Combined<‘a> { parent: Parent, child: Child<‘a>, } impl<‘a> Combined<‘a> { fn new() -> Self { let parent = Parent { count: 42 }; let child = Child { parent: &parent }; Combined { … Read more

Building the Rust Web App — Finishing Up | by Garrett Udstrand | Jul, 2022

What I learned after using Rocket Photo by Federico Bottos on Unsplash This is the sixth and final part of a multi-part series about writing web apps. For this series, we will write the web app in Rust, and I’ll explain how to write it yourself. If you’d rather not write out the code yourself, … Read more

rust – How to solve Docker Buildx Error on M1 Pro?

I was trying to build a Docker image for a Rust “helloworld” webapp in a Docker Multi platform image. However, my build for the linux/amd64 image always fail while the linux/arm64 build always succeed. My config: MacBook Pro 2021 M1 Pro 32GB RAM MacOS 12.4 Docker for Desktop 4.10.1 My src/main.rs is: use actix_web::{get, App, … Read more

The Essential Cargo Functions You Should Know To Use Rust | by Hoseung Choi | Jul, 2022

Your cargo guide Photo by Chris Pagan on Unsplash Cargo is a Build System and Package manager of Rust. like pip in Python or npm in JavaScript. This means, cargo is a tool that makes us easily download external crates or manage dependencies with a single line command. Many people are confused with the following … Read more

Building the Rust Web App — Proper Error Handling and Return Values ​​| by Garrett Udstrand | Jul, 2022

To make your web app work properly Photo by Aldebaran S on Unsplash This is the fourth part in a multi-part series about writing web apps. For this series, we will be writing the web app in Rust, and I explain to you how to write it yourself. If you’d rather not write out the … Read more

Introduction to ROS2 With Rust. write publishers and subscribers | by Timothy Shan | Jun, 2022

Write publishers and subscribers In May 2022, ROS 2 Humble Hawksbill (humble) was released, which supports Ubuntu 22.04. Since I am still using Ubuntu 20.04, this blog will focus on foxy. First thing first, how to install ROS2? Because our team is migrating from ROS1 to ROS2, I need to use both for now. My … Read more

Tutorial: Build a Simple Rust App and Connect It to ScyllaDB NoSQL

ScyllaDB, an open-source database for data-intensive applications that require high performance and low latency, is an excellent match for Rust. Similar to the Rust programming language and the Tokio framework, ScyllaDB is built on an asynchronous, non-blocking runtime that works well for building highly-reliable low-latency distributed applications. The ScyllaDB team has developed the scylla-rust-driver, an … Read more

Implement an Email Masking Proof-of-concept Using AWS Simple Email Service (SES) and AWS Rust SDK | by Julien de Charentenay | Jun, 2022

Stem the email marketing tide using masking Image by Anne-Onyme from Pixabay This story presents a proof-of-concept that allow me to give a unique email address anything@mydomain.com when subscribing to mailing lists, and registering unimportant accounts. anything can be any word that I decide on the spot when I give the address. The emails are … Read more