Briefing | community hot this month

  • Source: Rust Daily
  • The author:RustDaily newspaper group
  • Post editor: Zhang Handong

The CURL support RUSTLS

Rustls is a modern TLS (Secure Transport Protocol) library written in Rust. It has been incorporated into a backend for CURL

Curl has some alternate backends for each of these features:

  • International Domain Names
  • Name resolving
  • TLS
  • SSH
  • HTTP/3
  • HTTP content encoding
  • HTTP

Daniel. Haxx. Se/blog / 2021/0…

Rust full stack framework MoonZoon program

  • The warehouse link

This is a new project by Seed authors with the goal of creating a full-stack framework for pure Rust.

  • NO Javascript
  • NO CSS
  • NO HTML
  • NO REST
  • NO GraphQL
  • NO SQL
  • NO Analysis Paralysis
  • NO Wheel Reinventing
  • NO Passwords*

The goal is relatively large, and it is currently in the draft stage. Those who are interested can follow and participate.

Personal opinion: Rust doesn’t really need a full stack framework. This framework does not limit what users can use, and gives maximum freedom to use what they want.

VSCode fixes a weird bug in Rust workflow

The latest VSCode version has a PR in it to prevent the prompt popup from over-scrolling. If you scroll down to the bottom, the scrolling will continue and pop up from the document window. This problem has now been resolved. 🎉

www.reddit.com/r/rust/comm…

Google funded a project to secure the Apache Web server with a new Rust component

According to ZDNet, The Apache Web server, funded by Google and led by the Internet Security Research Group, will be set up to receive the new Rust-based mod_SSL module (to convert Apache HTTP) The key component of the Web server project was moved from the error-prone C programming language to Rust, a more secure alternative), which will be based on Rustls; Developed the Rust open source library as an alternative to the C-based OpenSSL project.

Reading: www.zdnet.com/article/goo…

Rust-analyzer internal Architecture documentation updated!

Rust-analyzer is an experimental rust compiler front end for ides.

Read more: github.com/rust-analyz…

Microsoft’s Rust course starts next month

A few days ago it was announced that Microsoft is forming a Rust team. Now, Microsoft Reactor is hosting two Rust sessions in March. Here’s a preview of the sessions.

Preparation before class:

No Rust experience is required, but it is better if you have experience with other programming languages.

Suitable for people:

This workshop is for developers who want to learn Rust. No experience with Rust is required, but experience with other programming languages will help you learn Rust faster.

Participate in this sharing, you will gain:

If you want to become more familiar with Rust, including variables, data types, functions, collection types, and control flows, you should attend this workshop.

The host:

Microsoft Reactor Shanghai is a community space created by Microsoft to build a community of developers.

Original text: mp.weixin.qq.com/s/TS3R8MNF_…

The RPM-OSTree of CoreOS rewrites some functionality in Rust

Rpm-ostree, a package manager on CoreOS, recently used Rust to rewrite some of its functionality. The team says more oxidation projects (such as /etc/{passwd,group}) are in the works.

Link: github.com/coreos/rpm-…

2 Years of Rust for Web Development

Original address: kerkour.com/blog/rust-f…

About two years ago, I started developing Web services (JSON APIS) with Rust, and I thought it was time to shake off preconceptions and share what I had learned.

Bias:

  • Rust code is ugly: Rust is explicit. There’s no denying it. But when I write code, my IDE helps me a lot without having to press so many keys. When I read the code, the clarity was great! No hidden surprises, no strange things.
  • Memory management is a distraction: actually, it isn’t. Instead of using so many lexical life cycles, I used smart Pointers. Yes, so I understand the difference between Box, Rc, and Arc, and it doesn’t hurt my productivity compared to Node.js and Golang.
  • Compilers are cumbersome: at first, yes. But after a few months, I was able to understand the mistakes immediately and fix them immediately. Today, I really didn’t spend much time on the compiler. Instead, it became my best friend, especially when refactoring most of the code or upgrading dependencies.
  • Slow compile time: I give this note. A Docker image of a medium-sized service takes about 3 to 10 minutes to build and deploy in Node.js or Golang, and about 30 minutes in Rust.
  • Ecosystems do not yet exist: admittedly, they do. Some components are missing, such as the official Stripe and AWS development kit, but the community is really active and building all of these missing components.

A few things about me that deserve a thumbs up

  • Static linking is simple: creating small Docker images is a pleasure.
  • Rust will make you a better programmer: Rust is complex, and it won’t let you off the hook if you don’t understand how it works in detail. It takes time and patience to master it, but once you do, you’ll learn a lot about programming that you’ll never get as close to. While learning how Tokio works, I learned how the Golang runtime works. (Mental model learning)
  • Once it compiles, it usually works: this is my favorite thing about Rust. When my program compiles, it works as I planned. Note: Just remember not to block the event loop and the compiler will take care of the rest. You no longer need to spend time writing tests for language quirks.
  • Rust is highly productive: Because Rust is multiple paradigms, it is really great for writing complex business logic because of its functionality.

I’m currently using some crates

  • Actix-web is used for the HTTP layer.
  • SQLX is used for the PostgreSQL database.
  • Rusoto AWS Interface Services (S3, SQS, SES)
  • Tera is used for email templates
  • Thiserror is used for error type handling
  • Sentry is used for error monitoring

conclusion

Rust is well suited for Web development, and I strongly recommend giving it a try.

Success is a long journey, but it’s totally worth it. Even if you don’t use it every day, you’ll learn it and become a better programmer. If you lose it, rediscover the joy of programming 🤗.

In a word, Rust is born of peace. There are no more bad surprises at 3am because the dependency updates its API to make it bug-free. No more annoying configuration for auto zooming or anything. And the response time is so short that your users will love your product.

Content: February issue of Rust Chinese (Rust_Magazine)